• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    KHR_platform_ohos
4
5Name Strings
6
7    EGL_KHR_platform_ohos
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    Draft
22
23Version
24
25    Version 1, Dec. 14, 2021
26
27Number
28
29    EGL Extension #149
30
31Extension Type
32
33    EGL client extension
34
35Dependencies
36
37    EGL 1.5 is required.
38
39Overview
40
41    This extension defines how to create EGL resources from native Android
42    resources using the EGL 1.5 platform functionality.
43
44New Types
45
46    None
47
48New Procedures and Functions
49
50    None
51
52New Tokens
53
54    Accepted as the <platform> argument of eglGetPlatformDisplay:
55
56        EGL_PLATFORM_OHOS_KHR                0x34E0
57
58Additions to the EGL Specification
59
60    None.
61
62New Behavior
63
64    To determine if the EGL implementation supports this extension, clients
65    should query the EGL_EXTENSIONS string of EGL_NO_DISPLAY.
66
67    To obtain an EGLDisplay for the Openharmony device, call eglGetPlatformDisplay
68    with <platform> set to EGL_PLATFORM_OHOS_KHR and with <native_display>
69    set to EGL_DEFAULT_DISPLAY.
70
71    For each EGLConfig that belongs to the Openharmony platform, the
72    EGL_NATIVE_VISUAL_ID attribute is an Openharmony window format, such as
73    PIXEL_FMT_RGBA_8888.
74
75    To obtain a rendering surface from an Openharmony surface window, call
76    eglCreatePlatformWindowSurface with a <dpy> that belongs to the Openharmony
77    platform and a <native_window> that points to a HNativeWindow.
78
79    It is not valid to call eglCreatePlatformPixmapSurface with a <dpy> that
80    belongs to the Openharmony platform. Any such call fails and generates
81    an EGL_BAD_PARAMETER error.
82
83Revision History
84
85#1 (Xindong Shi, Zheng Li, Dec. 14, 2021)
86    - Initial draft.
87