102f4aeb0Sopenharmony_ciName 202f4aeb0Sopenharmony_ci 302f4aeb0Sopenharmony_ci ANDROID_image_native_buffer 402f4aeb0Sopenharmony_ci 502f4aeb0Sopenharmony_ciName Strings 602f4aeb0Sopenharmony_ci 702f4aeb0Sopenharmony_ci EGL_ANDROID_image_native_buffer 802f4aeb0Sopenharmony_ci 902f4aeb0Sopenharmony_ciContributors 1002f4aeb0Sopenharmony_ci 1102f4aeb0Sopenharmony_ci Mathias Agopian 1202f4aeb0Sopenharmony_ci Jamie Gennis 1302f4aeb0Sopenharmony_ci Jesse Hall 1402f4aeb0Sopenharmony_ci 1502f4aeb0Sopenharmony_ciContact 1602f4aeb0Sopenharmony_ci 1702f4aeb0Sopenharmony_ci Jesse Hall, Google Inc. (jessehall 'at' google.com) 1802f4aeb0Sopenharmony_ci 1902f4aeb0Sopenharmony_ciStatus 2002f4aeb0Sopenharmony_ci 2102f4aeb0Sopenharmony_ci Complete 2202f4aeb0Sopenharmony_ci 2302f4aeb0Sopenharmony_ciVersion 2402f4aeb0Sopenharmony_ci 2502f4aeb0Sopenharmony_ci Version 1, November 28, 2012 2602f4aeb0Sopenharmony_ci 2702f4aeb0Sopenharmony_ciNumber 2802f4aeb0Sopenharmony_ci 2902f4aeb0Sopenharmony_ci EGL Extension #49 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 an Android window buffer (struct 4302f4aeb0Sopenharmony_ci ANativeWindowBuffer) 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_ANDROID 0x3140 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_ANDROID | Used for ANativeWindowBuffer 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_ANDROID, <dpy> must be a valid display, 7702f4aeb0Sopenharmony_ci <ctx> must be EGL_NO_CONTEXT, <buffer> must be a pointer to a valid 7802f4aeb0Sopenharmony_ci ANativeWindowBuffer 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_ANDROID and <buffer> is not a 8402f4aeb0Sopenharmony_ci pointer to a valid ANativeWindowBuffer, the error EGL_BAD_PARAMETER 8502f4aeb0Sopenharmony_ci is generated. 8602f4aeb0Sopenharmony_ci 8702f4aeb0Sopenharmony_ci * If <target> is EGL_NATIVE_BUFFER_ANDROID 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_ANDROID 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 ANativeWindowBuffer 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 Android releases. The minimum requirements for a given Android 10302f4aeb0Sopenharmony_ci version should be documented by that version. 10402f4aeb0Sopenharmony_ci 10502f4aeb0Sopenharmony_ciRevision History 10602f4aeb0Sopenharmony_ci 10702f4aeb0Sopenharmony_ci#1 (Jesse Hall, November 28, 2012) 10802f4aeb0Sopenharmony_ci - Initial draft. 109