102f4aeb0Sopenharmony_ciName 202f4aeb0Sopenharmony_ci 302f4aeb0Sopenharmony_ci KHR_platform_ohos 402f4aeb0Sopenharmony_ci 502f4aeb0Sopenharmony_ciName Strings 602f4aeb0Sopenharmony_ci 702f4aeb0Sopenharmony_ci EGL_KHR_platform_ohos 802f4aeb0Sopenharmony_ci 902f4aeb0Sopenharmony_ciContributors 1002f4aeb0Sopenharmony_ci 1102f4aeb0Sopenharmony_ci Xindong Shi 1202f4aeb0Sopenharmony_ci Zheng Li 1302f4aeb0Sopenharmony_ci 1402f4aeb0Sopenharmony_ciContact 1502f4aeb0Sopenharmony_ci 1602f4aeb0Sopenharmony_ci Xindong Shi, Huawei Inc. (shixindong 'at' huawei.com) 1702f4aeb0Sopenharmony_ci Zheng Li, Huawei Inc. (lizheng2 'at' huawei.com) 1802f4aeb0Sopenharmony_ci 1902f4aeb0Sopenharmony_ciStatus 2002f4aeb0Sopenharmony_ci 2102f4aeb0Sopenharmony_ci Draft 2202f4aeb0Sopenharmony_ci 2302f4aeb0Sopenharmony_ciVersion 2402f4aeb0Sopenharmony_ci 2502f4aeb0Sopenharmony_ci Version 1, Dec. 14, 2021 2602f4aeb0Sopenharmony_ci 2702f4aeb0Sopenharmony_ciNumber 2802f4aeb0Sopenharmony_ci 2902f4aeb0Sopenharmony_ci EGL Extension #149 3002f4aeb0Sopenharmony_ci 3102f4aeb0Sopenharmony_ciExtension Type 3202f4aeb0Sopenharmony_ci 3302f4aeb0Sopenharmony_ci EGL client extension 3402f4aeb0Sopenharmony_ci 3502f4aeb0Sopenharmony_ciDependencies 3602f4aeb0Sopenharmony_ci 3702f4aeb0Sopenharmony_ci EGL 1.5 is required. 3802f4aeb0Sopenharmony_ci 3902f4aeb0Sopenharmony_ciOverview 4002f4aeb0Sopenharmony_ci 4102f4aeb0Sopenharmony_ci This extension defines how to create EGL resources from native Android 4202f4aeb0Sopenharmony_ci resources using the EGL 1.5 platform functionality. 4302f4aeb0Sopenharmony_ci 4402f4aeb0Sopenharmony_ciNew Types 4502f4aeb0Sopenharmony_ci 4602f4aeb0Sopenharmony_ci None 4702f4aeb0Sopenharmony_ci 4802f4aeb0Sopenharmony_ciNew Procedures and Functions 4902f4aeb0Sopenharmony_ci 5002f4aeb0Sopenharmony_ci None 5102f4aeb0Sopenharmony_ci 5202f4aeb0Sopenharmony_ciNew Tokens 5302f4aeb0Sopenharmony_ci 5402f4aeb0Sopenharmony_ci Accepted as the <platform> argument of eglGetPlatformDisplay: 5502f4aeb0Sopenharmony_ci 5602f4aeb0Sopenharmony_ci EGL_PLATFORM_OHOS_KHR 0x34E0 5702f4aeb0Sopenharmony_ci 5802f4aeb0Sopenharmony_ciAdditions to the EGL Specification 5902f4aeb0Sopenharmony_ci 6002f4aeb0Sopenharmony_ci None. 6102f4aeb0Sopenharmony_ci 6202f4aeb0Sopenharmony_ciNew Behavior 6302f4aeb0Sopenharmony_ci 6402f4aeb0Sopenharmony_ci To determine if the EGL implementation supports this extension, clients 6502f4aeb0Sopenharmony_ci should query the EGL_EXTENSIONS string of EGL_NO_DISPLAY. 6602f4aeb0Sopenharmony_ci 6702f4aeb0Sopenharmony_ci To obtain an EGLDisplay for the Openharmony device, call eglGetPlatformDisplay 6802f4aeb0Sopenharmony_ci with <platform> set to EGL_PLATFORM_OHOS_KHR and with <native_display> 6902f4aeb0Sopenharmony_ci set to EGL_DEFAULT_DISPLAY. 7002f4aeb0Sopenharmony_ci 7102f4aeb0Sopenharmony_ci For each EGLConfig that belongs to the Openharmony platform, the 7202f4aeb0Sopenharmony_ci EGL_NATIVE_VISUAL_ID attribute is an Openharmony window format, such as 7302f4aeb0Sopenharmony_ci PIXEL_FMT_RGBA_8888. 7402f4aeb0Sopenharmony_ci 7502f4aeb0Sopenharmony_ci To obtain a rendering surface from an Openharmony surface window, call 7602f4aeb0Sopenharmony_ci eglCreatePlatformWindowSurface with a <dpy> that belongs to the Openharmony 7702f4aeb0Sopenharmony_ci platform and a <native_window> that points to a HNativeWindow. 7802f4aeb0Sopenharmony_ci 7902f4aeb0Sopenharmony_ci It is not valid to call eglCreatePlatformPixmapSurface with a <dpy> that 8002f4aeb0Sopenharmony_ci belongs to the Openharmony platform. Any such call fails and generates 8102f4aeb0Sopenharmony_ci an EGL_BAD_PARAMETER error. 8202f4aeb0Sopenharmony_ci 8302f4aeb0Sopenharmony_ciRevision History 8402f4aeb0Sopenharmony_ci 8502f4aeb0Sopenharmony_ci#1 (Xindong Shi, Zheng Li, Dec. 14, 2021) 8602f4aeb0Sopenharmony_ci - Initial draft. 87