15 Jamie Gennis, Google Inc. (jgennis 'at' google.com)
23 Version 2, July 15, 2011
33 This extension is written against the wording of the EGL 1.4 Specification
37 Android supports a number of different ANativeWindow implementations that
38 can be used to create an EGLSurface. One implementation, which records the
39 rendered image as a video each time eglSwapBuffers gets called, may have
40 some device-specific restrictions. Because of this, some EGLConfigs may be
41 incompatible with these ANativeWindows. This extension introduces a new
42 boolean EGLConfig attribute that indicates whether the EGLConfig supports
43 rendering to an ANativeWindow that records images to a video.
49 New Procedures and Functions
55 Accepted by the <attribute> parameter of eglGetConfigAttrib and
56 the <attrib_list> parameter of eglChooseConfig:
58 EGL_RECORDABLE_ANDROID 0x3142
60 Changes to Chapter 3 of the EGL 1.4 Specification (EGL Functions and Errors)
62 Section 3.4, Configuration Management, add a row to Table 3.1.
65 ---------------------- ------- --------------------------
66 EGL_RECORDABLE_ANDROID boolean whether video recording is
69 Section 3.4, Configuration Management, add a row to Table 3.4.
71 Attribute Default Selection Sort Sort
72 Criteria Order Priority
73 ---------------------- ------------- --------- ----- --------
74 EGL_RECORDABLE_ANDROID EGL_DONT_CARE Exact None
76 Section 3.4, Configuration Management, add a paragraph at the end of the
77 subsection titled Other EGLConfig Attribute Descriptions.
79 EGL_RECORDABLE_ANDROID is a boolean indicating whether the config may
80 be used to create an EGLSurface from an ANativeWindow that is a video
81 recorder as indicated by the NATIVE_WINDOW_IS_VIDEO_RECORDER query on
84 Section 3.4.1, Querying Configurations, change the last paragraph as follow
86 EGLConfigs are not sorted with respect to the parameters
87 EGL_BIND_TO_TEXTURE_RGB, EGL_BIND_TO_TEXTURE_RGBA, EGL_CONFORMANT,
88 EGL_LEVEL, EGL_NATIVE_RENDERABLE, EGL_MAX_SWAP_INTERVAL,
89 EGL_MIN_SWAP_INTERVAL, EGL_RENDERABLE_TYPE, EGL_SURFACE_TYPE,
90 EGL_TRANSPARENT_TYPE, EGL_TRANSPARENT_RED_VALUE,
91 EGL_TRANSPARENT_GREEN_VALUE, EGL_TRANSPARENT_BLUE_VALUE, and
92 EGL_RECORDABLE_ANDROID.
96 1. Should this functionality be exposed as a new attribute or as a bit in
97 the EGL_SURFACE_TYPE bitfield?
99 RESOLVED: It should be a new attribute. It does not make sense to use up a
100 bit in the limit-size bitfield for a platform-specific extension.
102 2. How should the new attribute affect the sorting of EGLConfigs?
104 RESOLVED: It should not affect sorting. Some implementations may not have
105 any drawback associated with using a recordable EGLConfig. Such
106 implementations should not have to double-up some of their configs to one
107 sort earlier than . Implementations that do have drawbacks can use the
108 existing caveat mechanism to report this drawback to the client.
110 3. How is this extension expected to be implemented?
112 RESPONSE: There are two basic approaches to implementing this extension
113 that were considered during its design. In both cases it is assumed that a
114 color space conversion must be performed at some point because most video
115 encoding formats use a YUV color space. The two approaches are
116 distinguished by the point at which this color space conversion is
119 One approach involves performing the color space conversion as part of the
120 eglSwapBuffers call before queuing the rendered image to the ANativeWindow.
121 In this case, the VisualID of the EGLConfig would correspond to a YUV
122 Android HAL pixel format from which the video encoder can read. The
123 EGLConfig would likely have the EGL_SLOW_CONFIG caveat because using that
124 config to render normal window contents would result in an RGB -> YUV color
125 space conversion when rendering the frame as well as a YUV -> RGB
126 conversion when compositing the window.
128 The other approach involves performing the color space conversion in the
129 video encoder. In this case, the VisualID of the EGLConfig would
130 correspond to an RGB HAL pixel format from which the video encoder can
131 read. The EGLConfig would likely not need to have any caveat set, as using
132 this config for normal window rendering would not have any added cost.
136 #2 (Jamie Gennis, July 15, 2011)
139 #1 (Jamie Gennis, July 8, 2011)