• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    OHOS_image_native_buffer
4
5Name Strings
6
7    EGL_OHOS_image_native_buffer
8
9Contributors
10
11    Xindong Shi
12    Zheng Li
13
14Contact
15
16    Xindong Shi, Huawei Inc. (shixindong 'at' huawei.com)
17    Zheng Li, Huawei Inc. (lizheng2 'at' huawei.com)
18
19Status
20
21    Complete
22
23Version
24
25    Version 1, Dec. 14, 2021
26
27Number
28
29    EGL Extension #148
30
31Dependencies
32
33    EGL 1.2 is required.
34
35    EGL_KHR_image_base is required.
36
37    This extension is written against the wording of the EGL 1.2
38    Specification.
39
40Overview
41
42    This extension enables using a Openharmony native buffer (struct
43    HNativeWindowBuffer) as an EGLImage source.
44
45New Types
46
47    None.
48
49New Procedures and Functions
50
51    None.
52
53New Tokens
54
55    Accepted by the <target> parameter of eglCreateImageKHR:
56
57    EGL_NATIVE_BUFFER_OHOS             0x34E1
58
59Changes to Chapter 3 of the EGL 1.2 Specification (EGL Functions and Errors)
60
61    Add to section 2.5.1 "EGLImage Specification" (as defined by the
62    EGL_KHR_image_base specification), in the description of
63    eglCreateImageKHR:
64
65   "Values accepted for <target> are listed in Table aaa, below.
66
67      +-------------------------+---------------------------------------------------+
68      | <target>                | Notes                                             |
69      +-------------------------+---------------------------------------------------+
70      | EGL_NATIVE_BUFFER_OHOS  | Used for Openharmony HNativeWindowBuffer objects  |
71      +-------------------------+---------------------------------------------------+
72       Table aaa.  Legal values for eglCreateImageKHR <target> parameter
73
74    ...
75
76    If <target> is EGL_NATIVE_BUFFER_OHOS, <dpy> must be a valid display,
77    <ctx> must be EGL_NO_CONTEXT, <buffer> must be a pointer to a valid
78    HNativeWindowBuffer object (cast into the type EGLClientBuffer), and
79    attributes other than EGL_IMAGE_PRESERVED_KHR are ignored."
80
81    Add to the list of error conditions for eglCreateImageKHR:
82
83      "* If <target> is EGL_NATIVE_BUFFER_OHOS and <buffer> is not a
84         pointer to a valid HNativeWindowBuffer, the error EGL_BAD_PARAMETER
85         is generated.
86
87       * If <target> is EGL_NATIVE_BUFFER_OHOS and <ctx> is not
88         EGL_NO_CONTEXT, the error EGL_BAD_CONTEXT is generated.
89
90       * If <target> is EGL_NATIVE_BUFFER_OHOS and <buffer> was created
91         with properties (format, usage, dimensions, etc.) not supported by
92         the EGL implementation, the error EGL_BAD_PARAMETER is generated."
93
94Issues
95
96    1. Should this extension define what combinations of HNativeWindowBuffer
97    properties implementations are required to support?
98
99    RESOLVED: No.
100
101    The requirements have evolved over time and will continue to change with
102    future Openharmony releases. The minimum requirements for a given Openharmony
103    version should be documented by that version.
104
105
106Revision History
107
108#1 (Xindong Shi, Zheng Li, Dec. 14, 2021)
109    - Initial draft.
110