Loading opengl/include/EGL/eglext.h +6 −0 Original line number Diff line number Diff line Loading @@ -611,6 +611,12 @@ typedef EGLAPI EGLClientBuffer (EGLAPIENTRYP PFNEGLCREATENATIVECLIENTBUFFERANDRO #endif #endif #ifndef EGL_ANDROID_front_buffer_auto_refresh #define EGL_ANDROID_front_buffer_auto_refresh 1 #define EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID 0x314C #endif #ifdef __cplusplus } #endif Loading opengl/libs/EGL/eglApi.cpp +5 −7 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ struct extention_map_t { * The rest (gExtensionString) depend on support in the EGL driver, and are * only available if the driver supports them. However, some of these must be * supported because they are used by the Android system itself; these are * listd as mandatory below and are required by the CDD. The system *assumes* * listed as mandatory below and are required by the CDD. The system *assumes* * the mandatory extensions are present and may not function properly if some * are missing. * Loading @@ -83,6 +83,7 @@ extern char const * const gBuiltinExtensionString = "EGL_ANDROID_presentation_time " "EGL_KHR_swap_buffers_with_damage " "EGL_ANDROID_create_native_client_buffer " "EGL_ANDROID_front_buffer_auto_refresh " ; extern char const * const gExtensionString = "EGL_KHR_image " // mandatory Loading Loading @@ -1194,12 +1195,9 @@ EGLBoolean eglSurfaceAttrib( egl_surface_t const * const s = get_surface(surface); //XXX: temporary hack for the EGL hook-up for single buffer mode if (attribute == EGL_RENDER_BUFFER && (value == EGL_BACK_BUFFER || value == EGL_SINGLE_BUFFER)) { native_window_set_auto_refresh(s->win.get(), true); return (native_window_set_single_buffer_mode(s->win.get(), value == EGL_SINGLE_BUFFER)) ? EGL_TRUE : EGL_FALSE; if (attribute == EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID) { return (native_window_set_auto_refresh(s->win.get(), value ? true : false)) ? EGL_TRUE : EGL_FALSE; } if (s->cnx->egl.eglSurfaceAttrib) { Loading opengl/specs/EGL_ANDROID_front_buffer_auto_refresh.txt 0 → 100644 +70 −0 Original line number Diff line number Diff line Name ANDROID_front_buffer_auto_refresh Name Strings EGL_ANDROID_front_buffer_auto_refresh Contributors Pablo Ceballos Contact Pablo Ceballos, Google Inc. (pceballos 'at' google.com) Status Draft Version Version 1, February 3, 2016 Number EGL Extension #XXX Dependencies Requires EGL 1.2 This extension is written against the wording of the EGL 1.5 Specification Overview This extension is intended for latency-sensitive applications that are doing front-buffer rendering. It allows them to indicate to the Android compositor that it should perform composition every time the display refreshes. This removes the overhead of having to notify the compositor that the window surface has been updated, but it comes at the cost of doing potentially unneeded composition work if the window surface has not been updated. New Types None New Procedures and Functions None New Tokens EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID 0x314C Add to the list of supported tokens for eglSurfaceAttrib in section 3.5.6 "Surface Attributes", page 43: If attribute is EGL_ANDROID_front_buffer_auto_refresh, then value specifies whether to enable or disable auto-refresh in the Android compositor when doing front-buffer rendering. Issues None Revision History #1 (Pablo Ceballos, February 3, 2016) - Initial draft. opengl/specs/README +5 −4 Original line number Diff line number Diff line Loading @@ -6,10 +6,10 @@ for use by Android extensions. Value Extension ---------------- ---------------------------------- 0x3140 EGL_ANDROID_image_native_buffer 0x3141 (unused) 0x3140 EGL_NATIVE_BUFFER_ANDROID (EGL_ANDROID_image_native_buffer) 0x3141 EGL_PLATFORM_ANDROID_KHR (KHR_platform_android) 0x3142 EGL_RECORDABLE_ANDROID (EGL_ANDROID_recordable) 0x3143 EGL_VERSION_HW_ANDROID (internal use) 0x3143 EGL_NATIVE_BUFFER_USAGE_ANDROID (EGL_ANDROID_create_native_client_buffer) 0x3144 EGL_SYNC_NATIVE_FENCE_ANDROID (EGL_ANDROID_native_fence_sync) 0x3145 EGL_SYNC_NATIVE_FENCE_FD_ANDROID (EGL_ANDROID_native_fence_sync) 0x3146 EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID (EGL_ANDROID_native_fence_sync) Loading @@ -18,4 +18,5 @@ for use by Android extensions. 0x3149 EGL_IMAGE_CROP_TOP_ANDROID (EGL_ANDROID_image_crop) 0x314A EGL_IMAGE_CROP_RIGHT_ANDROID (EGL_ANDROID_image_crop) 0x314B EGL_IMAGE_CROP_BOTTOM_ANDROID (EGL_ANDROID_image_crop) 0x314C - 0x314F (unused) 0x314C EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID (EGL_ANDROID_front_buffer_auto_refresh) 0x314D - 0x314F (unused) Loading
opengl/include/EGL/eglext.h +6 −0 Original line number Diff line number Diff line Loading @@ -611,6 +611,12 @@ typedef EGLAPI EGLClientBuffer (EGLAPIENTRYP PFNEGLCREATENATIVECLIENTBUFFERANDRO #endif #endif #ifndef EGL_ANDROID_front_buffer_auto_refresh #define EGL_ANDROID_front_buffer_auto_refresh 1 #define EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID 0x314C #endif #ifdef __cplusplus } #endif Loading
opengl/libs/EGL/eglApi.cpp +5 −7 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ struct extention_map_t { * The rest (gExtensionString) depend on support in the EGL driver, and are * only available if the driver supports them. However, some of these must be * supported because they are used by the Android system itself; these are * listd as mandatory below and are required by the CDD. The system *assumes* * listed as mandatory below and are required by the CDD. The system *assumes* * the mandatory extensions are present and may not function properly if some * are missing. * Loading @@ -83,6 +83,7 @@ extern char const * const gBuiltinExtensionString = "EGL_ANDROID_presentation_time " "EGL_KHR_swap_buffers_with_damage " "EGL_ANDROID_create_native_client_buffer " "EGL_ANDROID_front_buffer_auto_refresh " ; extern char const * const gExtensionString = "EGL_KHR_image " // mandatory Loading Loading @@ -1194,12 +1195,9 @@ EGLBoolean eglSurfaceAttrib( egl_surface_t const * const s = get_surface(surface); //XXX: temporary hack for the EGL hook-up for single buffer mode if (attribute == EGL_RENDER_BUFFER && (value == EGL_BACK_BUFFER || value == EGL_SINGLE_BUFFER)) { native_window_set_auto_refresh(s->win.get(), true); return (native_window_set_single_buffer_mode(s->win.get(), value == EGL_SINGLE_BUFFER)) ? EGL_TRUE : EGL_FALSE; if (attribute == EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID) { return (native_window_set_auto_refresh(s->win.get(), value ? true : false)) ? EGL_TRUE : EGL_FALSE; } if (s->cnx->egl.eglSurfaceAttrib) { Loading
opengl/specs/EGL_ANDROID_front_buffer_auto_refresh.txt 0 → 100644 +70 −0 Original line number Diff line number Diff line Name ANDROID_front_buffer_auto_refresh Name Strings EGL_ANDROID_front_buffer_auto_refresh Contributors Pablo Ceballos Contact Pablo Ceballos, Google Inc. (pceballos 'at' google.com) Status Draft Version Version 1, February 3, 2016 Number EGL Extension #XXX Dependencies Requires EGL 1.2 This extension is written against the wording of the EGL 1.5 Specification Overview This extension is intended for latency-sensitive applications that are doing front-buffer rendering. It allows them to indicate to the Android compositor that it should perform composition every time the display refreshes. This removes the overhead of having to notify the compositor that the window surface has been updated, but it comes at the cost of doing potentially unneeded composition work if the window surface has not been updated. New Types None New Procedures and Functions None New Tokens EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID 0x314C Add to the list of supported tokens for eglSurfaceAttrib in section 3.5.6 "Surface Attributes", page 43: If attribute is EGL_ANDROID_front_buffer_auto_refresh, then value specifies whether to enable or disable auto-refresh in the Android compositor when doing front-buffer rendering. Issues None Revision History #1 (Pablo Ceballos, February 3, 2016) - Initial draft.
opengl/specs/README +5 −4 Original line number Diff line number Diff line Loading @@ -6,10 +6,10 @@ for use by Android extensions. Value Extension ---------------- ---------------------------------- 0x3140 EGL_ANDROID_image_native_buffer 0x3141 (unused) 0x3140 EGL_NATIVE_BUFFER_ANDROID (EGL_ANDROID_image_native_buffer) 0x3141 EGL_PLATFORM_ANDROID_KHR (KHR_platform_android) 0x3142 EGL_RECORDABLE_ANDROID (EGL_ANDROID_recordable) 0x3143 EGL_VERSION_HW_ANDROID (internal use) 0x3143 EGL_NATIVE_BUFFER_USAGE_ANDROID (EGL_ANDROID_create_native_client_buffer) 0x3144 EGL_SYNC_NATIVE_FENCE_ANDROID (EGL_ANDROID_native_fence_sync) 0x3145 EGL_SYNC_NATIVE_FENCE_FD_ANDROID (EGL_ANDROID_native_fence_sync) 0x3146 EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID (EGL_ANDROID_native_fence_sync) Loading @@ -18,4 +18,5 @@ for use by Android extensions. 0x3149 EGL_IMAGE_CROP_TOP_ANDROID (EGL_ANDROID_image_crop) 0x314A EGL_IMAGE_CROP_RIGHT_ANDROID (EGL_ANDROID_image_crop) 0x314B EGL_IMAGE_CROP_BOTTOM_ANDROID (EGL_ANDROID_image_crop) 0x314C - 0x314F (unused) 0x314C EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID (EGL_ANDROID_front_buffer_auto_refresh) 0x314D - 0x314F (unused)