1Name 2 3 ANDROID_image_native_buffer 4 5Name Strings 6 7 EGL_ANDROID_image_native_buffer 8 9Contributors 10 11 Mathias Agopian 12 Jamie Gennis 13 Jesse Hall 14 15Contact 16 17 Jesse Hall, Google Inc. (jessehall 'at' google.com) 18 19Status 20 21 Complete 22 23Version 24 25 Version 1, November 28, 2012 26 27Number 28 29 EGL Extension #49 30 31Dependencies 32 33 EGL 1.2 is required. 34 35 EGL_KHR_image_base is required. 36 37 This extension is written against the wording of the EGL 1.2 38 Specification. 39 40Overview 41 42 This extension enables using an Android window buffer (struct 43 ANativeWindowBuffer) as an EGLImage source. 44 45New Types 46 47 None. 48 49New Procedures and Functions 50 51 None. 52 53New Tokens 54 55 Accepted by the <target> parameter of eglCreateImageKHR: 56 57 EGL_NATIVE_BUFFER_ANDROID 0x3140 58 59Changes to Chapter 3 of the EGL 1.2 Specification (EGL Functions and Errors) 60 61 Add to section 2.5.1 "EGLImage Specification" (as defined by the 62 EGL_KHR_image_base specification), in the description of 63 eglCreateImageKHR: 64 65 "Values accepted for <target> are listed in Table aaa, below. 66 67 +----------------------------+-----------------------------------------+ 68 | <target> | Notes | 69 +----------------------------+-----------------------------------------+ 70 | EGL_NATIVE_BUFFER_ANDROID | Used for ANativeWindowBuffer objects | 71 +----------------------------+-----------------------------------------+ 72 Table aaa. Legal values for eglCreateImageKHR <target> parameter 73 74 ... 75 76 If <target> is EGL_NATIVE_BUFFER_ANDROID, <dpy> must be a valid display, 77 <ctx> must be EGL_NO_CONTEXT, <buffer> must be a pointer to a valid 78 ANativeWindowBuffer object (cast into the type EGLClientBuffer), and 79 attributes other than EGL_IMAGE_PRESERVED_KHR are ignored." 80 81 Add to the list of error conditions for eglCreateImageKHR: 82 83 "* If <target> is EGL_NATIVE_BUFFER_ANDROID and <buffer> is not a 84 pointer to a valid ANativeWindowBuffer, the error EGL_BAD_PARAMETER 85 is generated. 86 87 * If <target> is EGL_NATIVE_BUFFER_ANDROID and <ctx> is not 88 EGL_NO_CONTEXT, the error EGL_BAD_CONTEXT is generated. 89 90 * If <target> is EGL_NATIVE_BUFFER_ANDROID and <buffer> was created 91 with properties (format, usage, dimensions, etc.) not supported by 92 the EGL implementation, the error EGL_BAD_PARAMETER is generated." 93 94Issues 95 96 1. Should this extension define what combinations of ANativeWindowBuffer 97 properties implementations are required to support? 98 99 RESOLVED: No. 100 101 The requirements have evolved over time and will continue to change with 102 future Android releases. The minimum requirements for a given Android 103 version should be documented by that version. 104 105Revision History 106 107#1 (Jesse Hall, November 28, 2012) 108 - Initial draft. 109