102f4aeb0Sopenharmony_ciName
202f4aeb0Sopenharmony_ci
302f4aeb0Sopenharmony_ci    KHR_platform_android
402f4aeb0Sopenharmony_ci
502f4aeb0Sopenharmony_ciName Strings
602f4aeb0Sopenharmony_ci
702f4aeb0Sopenharmony_ci    EGL_KHR_platform_android
802f4aeb0Sopenharmony_ci
902f4aeb0Sopenharmony_ciContributors
1002f4aeb0Sopenharmony_ci
1102f4aeb0Sopenharmony_ci    Jesse Hall <jessehall 'at' google.com>
1202f4aeb0Sopenharmony_ci    The contributors to the EGL_KHR_platform_gbm extension, which this
1302f4aeb0Sopenharmony_ci        extension was based on.
1402f4aeb0Sopenharmony_ci
1502f4aeb0Sopenharmony_ciContacts
1602f4aeb0Sopenharmony_ci
1702f4aeb0Sopenharmony_ci    Jesse Hall <jessehall 'at' google.com>
1802f4aeb0Sopenharmony_ci
1902f4aeb0Sopenharmony_ciStatus
2002f4aeb0Sopenharmony_ci
2102f4aeb0Sopenharmony_ci    Complete.
2202f4aeb0Sopenharmony_ci    Approved by the EGL Working Group on January 31, 2014.
2302f4aeb0Sopenharmony_ci    Ratified by the Khronos Board of Promoters on March 14, 2014. 
2402f4aeb0Sopenharmony_ci
2502f4aeb0Sopenharmony_ciVersion
2602f4aeb0Sopenharmony_ci
2702f4aeb0Sopenharmony_ci    Version 1, 2014/01/27
2802f4aeb0Sopenharmony_ci
2902f4aeb0Sopenharmony_ciNumber
3002f4aeb0Sopenharmony_ci
3102f4aeb0Sopenharmony_ci    EGL Extension #68
3202f4aeb0Sopenharmony_ci
3302f4aeb0Sopenharmony_ciExtension Type
3402f4aeb0Sopenharmony_ci
3502f4aeb0Sopenharmony_ci    EGL client extension
3602f4aeb0Sopenharmony_ci
3702f4aeb0Sopenharmony_ciDependencies
3802f4aeb0Sopenharmony_ci
3902f4aeb0Sopenharmony_ci    EGL 1.5 is required.
4002f4aeb0Sopenharmony_ci
4102f4aeb0Sopenharmony_ci    This extension is written against the EGL 1.5 Specification (draft
4202f4aeb0Sopenharmony_ci    20140122).
4302f4aeb0Sopenharmony_ci
4402f4aeb0Sopenharmony_ciOverview
4502f4aeb0Sopenharmony_ci
4602f4aeb0Sopenharmony_ci    This extension defines how to create EGL resources from native Android
4702f4aeb0Sopenharmony_ci    resources using the EGL 1.5 platform functionality.
4802f4aeb0Sopenharmony_ci
4902f4aeb0Sopenharmony_ciNew Types
5002f4aeb0Sopenharmony_ci
5102f4aeb0Sopenharmony_ci    None
5202f4aeb0Sopenharmony_ci
5302f4aeb0Sopenharmony_ciNew Procedures and Functions
5402f4aeb0Sopenharmony_ci
5502f4aeb0Sopenharmony_ci    None
5602f4aeb0Sopenharmony_ci
5702f4aeb0Sopenharmony_ciNew Tokens
5802f4aeb0Sopenharmony_ci
5902f4aeb0Sopenharmony_ci    Accepted as the <platform> argument of eglGetPlatformDisplay:
6002f4aeb0Sopenharmony_ci
6102f4aeb0Sopenharmony_ci        EGL_PLATFORM_ANDROID_KHR                0x3141
6202f4aeb0Sopenharmony_ci
6302f4aeb0Sopenharmony_ciAdditions to the EGL Specification
6402f4aeb0Sopenharmony_ci
6502f4aeb0Sopenharmony_ci    None.
6602f4aeb0Sopenharmony_ci
6702f4aeb0Sopenharmony_ciNew Behavior
6802f4aeb0Sopenharmony_ci
6902f4aeb0Sopenharmony_ci    To determine if the EGL implementation supports this extension, clients
7002f4aeb0Sopenharmony_ci    should query the EGL_EXTENSIONS string of EGL_NO_DISPLAY.
7102f4aeb0Sopenharmony_ci
7202f4aeb0Sopenharmony_ci    To obtain an EGLDisplay for the Android device, call eglGetPlatformDisplay
7302f4aeb0Sopenharmony_ci    with <platform> set to EGL_PLATFORM_ANDROID_KHR and with <native_display>
7402f4aeb0Sopenharmony_ci    set to EGL_DEFAULT_DISPLAY.
7502f4aeb0Sopenharmony_ci
7602f4aeb0Sopenharmony_ci    For each EGLConfig that belongs to the Android platform, the
7702f4aeb0Sopenharmony_ci    EGL_NATIVE_VISUAL_ID attribute is an Android window format, such as
7802f4aeb0Sopenharmony_ci    WINDOW_FORMAT_RGBA_8888.
7902f4aeb0Sopenharmony_ci
8002f4aeb0Sopenharmony_ci    To obtain a rendering surface from an Android native window, call
8102f4aeb0Sopenharmony_ci    eglCreatePlatformWindowSurface with a <dpy> that belongs to the Android
8202f4aeb0Sopenharmony_ci    platform and a <native_window> that points to a ANativeWindow.
8302f4aeb0Sopenharmony_ci
8402f4aeb0Sopenharmony_ci    It is not valid to call eglCreatePlatformPixmapSurface with a <dpy> that
8502f4aeb0Sopenharmony_ci    belongs to the Android platform. Any such call fails and generates
8602f4aeb0Sopenharmony_ci    an EGL_BAD_PARAMETER error.
8702f4aeb0Sopenharmony_ci
8802f4aeb0Sopenharmony_ciIssues
8902f4aeb0Sopenharmony_ci
9002f4aeb0Sopenharmony_ci    1. Should this extension even exist? Android devices only support one
9102f4aeb0Sopenharmony_ci       window system.
9202f4aeb0Sopenharmony_ci
9302f4aeb0Sopenharmony_ci       RESOLUTION: Yes. Although the Android Open Source Project master branch 
9402f4aeb0Sopenharmony_ci       only supports one window system, customized versions of Android could
9502f4aeb0Sopenharmony_ci       extend that to support other window systems. More importantly, having a
9602f4aeb0Sopenharmony_ci       platform extension allows EGL 1.5 applications to use the platform and
9702f4aeb0Sopenharmony_ci       non-platform Get*Display and Create*WindowSurface calls interchangeably. As a user of the API it would be confusing if that didn't work.
9802f4aeb0Sopenharmony_ci
9902f4aeb0Sopenharmony_ciRevision History
10002f4aeb0Sopenharmony_ci
10102f4aeb0Sopenharmony_ci    Version 1, 2014/01/27 (Jesse Hall)
10202f4aeb0Sopenharmony_ci        - Initial draft.
103