102f4aeb0Sopenharmony_ciName 202f4aeb0Sopenharmony_ci 302f4aeb0Sopenharmony_ci OHOS_image_native_buffer 402f4aeb0Sopenharmony_ci 502f4aeb0Sopenharmony_ciName Strings 602f4aeb0Sopenharmony_ci 702f4aeb0Sopenharmony_ci EGL_OHOS_image_native_buffer 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 Complete 2202f4aeb0Sopenharmony_ci 2302f4aeb0Sopenharmony_ciVersion 2402f4aeb0Sopenharmony_ci 2502f4aeb0Sopenharmony_ci Version 1, Dec. 14, 2021 2602f4aeb0Sopenharmony_ci 2702f4aeb0Sopenharmony_ciNumber 2802f4aeb0Sopenharmony_ci 2902f4aeb0Sopenharmony_ci EGL Extension #148 3002f4aeb0Sopenharmony_ci 3102f4aeb0Sopenharmony_ciDependencies 3202f4aeb0Sopenharmony_ci 3302f4aeb0Sopenharmony_ci EGL 1.2 is required. 3402f4aeb0Sopenharmony_ci 3502f4aeb0Sopenharmony_ci EGL_KHR_image_base is required. 3602f4aeb0Sopenharmony_ci 3702f4aeb0Sopenharmony_ci This extension is written against the wording of the EGL 1.2 3802f4aeb0Sopenharmony_ci Specification. 3902f4aeb0Sopenharmony_ci 4002f4aeb0Sopenharmony_ciOverview 4102f4aeb0Sopenharmony_ci 4202f4aeb0Sopenharmony_ci This extension enables using a Openharmony native buffer (struct 4302f4aeb0Sopenharmony_ci HNativeWindowBuffer) as an EGLImage source. 4402f4aeb0Sopenharmony_ci 4502f4aeb0Sopenharmony_ciNew Types 4602f4aeb0Sopenharmony_ci 4702f4aeb0Sopenharmony_ci None. 4802f4aeb0Sopenharmony_ci 4902f4aeb0Sopenharmony_ciNew Procedures and Functions 5002f4aeb0Sopenharmony_ci 5102f4aeb0Sopenharmony_ci None. 5202f4aeb0Sopenharmony_ci 5302f4aeb0Sopenharmony_ciNew Tokens 5402f4aeb0Sopenharmony_ci 5502f4aeb0Sopenharmony_ci Accepted by the <target> parameter of eglCreateImageKHR: 5602f4aeb0Sopenharmony_ci 5702f4aeb0Sopenharmony_ci EGL_NATIVE_BUFFER_OHOS 0x34E1 5802f4aeb0Sopenharmony_ci 5902f4aeb0Sopenharmony_ciChanges to Chapter 3 of the EGL 1.2 Specification (EGL Functions and Errors) 6002f4aeb0Sopenharmony_ci 6102f4aeb0Sopenharmony_ci Add to section 2.5.1 "EGLImage Specification" (as defined by the 6202f4aeb0Sopenharmony_ci EGL_KHR_image_base specification), in the description of 6302f4aeb0Sopenharmony_ci eglCreateImageKHR: 6402f4aeb0Sopenharmony_ci 6502f4aeb0Sopenharmony_ci "Values accepted for <target> are listed in Table aaa, below. 6602f4aeb0Sopenharmony_ci 6702f4aeb0Sopenharmony_ci +-------------------------+---------------------------------------------------+ 6802f4aeb0Sopenharmony_ci | <target> | Notes | 6902f4aeb0Sopenharmony_ci +-------------------------+---------------------------------------------------+ 7002f4aeb0Sopenharmony_ci | EGL_NATIVE_BUFFER_OHOS | Used for Openharmony HNativeWindowBuffer objects | 7102f4aeb0Sopenharmony_ci +-------------------------+---------------------------------------------------+ 7202f4aeb0Sopenharmony_ci Table aaa. Legal values for eglCreateImageKHR <target> parameter 7302f4aeb0Sopenharmony_ci 7402f4aeb0Sopenharmony_ci ... 7502f4aeb0Sopenharmony_ci 7602f4aeb0Sopenharmony_ci If <target> is EGL_NATIVE_BUFFER_OHOS, <dpy> must be a valid display, 7702f4aeb0Sopenharmony_ci <ctx> must be EGL_NO_CONTEXT, <buffer> must be a pointer to a valid 7802f4aeb0Sopenharmony_ci HNativeWindowBuffer object (cast into the type EGLClientBuffer), and 7902f4aeb0Sopenharmony_ci attributes other than EGL_IMAGE_PRESERVED_KHR are ignored." 8002f4aeb0Sopenharmony_ci 8102f4aeb0Sopenharmony_ci Add to the list of error conditions for eglCreateImageKHR: 8202f4aeb0Sopenharmony_ci 8302f4aeb0Sopenharmony_ci "* If <target> is EGL_NATIVE_BUFFER_OHOS and <buffer> is not a 8402f4aeb0Sopenharmony_ci pointer to a valid HNativeWindowBuffer, the error EGL_BAD_PARAMETER 8502f4aeb0Sopenharmony_ci is generated. 8602f4aeb0Sopenharmony_ci 8702f4aeb0Sopenharmony_ci * If <target> is EGL_NATIVE_BUFFER_OHOS and <ctx> is not 8802f4aeb0Sopenharmony_ci EGL_NO_CONTEXT, the error EGL_BAD_CONTEXT is generated. 8902f4aeb0Sopenharmony_ci 9002f4aeb0Sopenharmony_ci * If <target> is EGL_NATIVE_BUFFER_OHOS and <buffer> was created 9102f4aeb0Sopenharmony_ci with properties (format, usage, dimensions, etc.) not supported by 9202f4aeb0Sopenharmony_ci the EGL implementation, the error EGL_BAD_PARAMETER is generated." 9302f4aeb0Sopenharmony_ci 9402f4aeb0Sopenharmony_ciIssues 9502f4aeb0Sopenharmony_ci 9602f4aeb0Sopenharmony_ci 1. Should this extension define what combinations of HNativeWindowBuffer 9702f4aeb0Sopenharmony_ci properties implementations are required to support? 9802f4aeb0Sopenharmony_ci 9902f4aeb0Sopenharmony_ci RESOLVED: No. 10002f4aeb0Sopenharmony_ci 10102f4aeb0Sopenharmony_ci The requirements have evolved over time and will continue to change with 10202f4aeb0Sopenharmony_ci future Openharmony releases. The minimum requirements for a given Openharmony 10302f4aeb0Sopenharmony_ci version should be documented by that version. 10402f4aeb0Sopenharmony_ci 10502f4aeb0Sopenharmony_ci 10602f4aeb0Sopenharmony_ciRevision History 10702f4aeb0Sopenharmony_ci 10802f4aeb0Sopenharmony_ci#1 (Xindong Shi, Zheng Li, Dec. 14, 2021) 10902f4aeb0Sopenharmony_ci - Initial draft. 110