Loading opengl/libs/EGL/eglApi.cpp +0 −10 Original line number Original line Diff line number Diff line Loading @@ -56,8 +56,6 @@ using namespace android; using namespace android; #define ENABLE_EGL_ANDROID_GET_FRAME_TIMESTAMPS 0 // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- namespace android { namespace android { Loading Loading @@ -88,9 +86,7 @@ extern char const * const gBuiltinExtensionString = "EGL_KHR_swap_buffers_with_damage " "EGL_KHR_swap_buffers_with_damage " "EGL_ANDROID_create_native_client_buffer " "EGL_ANDROID_create_native_client_buffer " "EGL_ANDROID_front_buffer_auto_refresh " "EGL_ANDROID_front_buffer_auto_refresh " #if ENABLE_EGL_ANDROID_GET_FRAME_TIMESTAMPS "EGL_ANDROID_get_frame_timestamps " "EGL_ANDROID_get_frame_timestamps " #endif ; ; extern char const * const gExtensionString = extern char const * const gExtensionString = "EGL_KHR_image " // mandatory "EGL_KHR_image " // mandatory Loading Loading @@ -1246,7 +1242,6 @@ EGLBoolean eglSurfaceAttrib( setError(EGL_BAD_SURFACE, EGL_FALSE); setError(EGL_BAD_SURFACE, EGL_FALSE); } } #if ENABLE_EGL_ANDROID_GET_FRAME_TIMESTAMPS if (attribute == EGL_TIMESTAMPS_ANDROID) { if (attribute == EGL_TIMESTAMPS_ANDROID) { if (!s->win.get()) { if (!s->win.get()) { return setError(EGL_BAD_SURFACE, EGL_FALSE); return setError(EGL_BAD_SURFACE, EGL_FALSE); Loading @@ -1256,7 +1251,6 @@ EGLBoolean eglSurfaceAttrib( return (err == NO_ERROR) ? EGL_TRUE : return (err == NO_ERROR) ? EGL_TRUE : setError(EGL_BAD_SURFACE, EGL_FALSE); setError(EGL_BAD_SURFACE, EGL_FALSE); } } #endif if (s->cnx->egl.eglSurfaceAttrib) { if (s->cnx->egl.eglSurfaceAttrib) { return s->cnx->egl.eglSurfaceAttrib( return s->cnx->egl.eglSurfaceAttrib( Loading Loading @@ -2168,12 +2162,10 @@ EGLBoolean eglGetCompositorTimingSupportedANDROID( } } switch (name) { switch (name) { #if ENABLE_EGL_ANDROID_GET_FRAME_TIMESTAMPS case EGL_COMPOSITE_DEADLINE_ANDROID: case EGL_COMPOSITE_DEADLINE_ANDROID: case EGL_COMPOSITE_INTERVAL_ANDROID: case EGL_COMPOSITE_INTERVAL_ANDROID: case EGL_COMPOSITE_TO_PRESENT_LATENCY_ANDROID: case EGL_COMPOSITE_TO_PRESENT_LATENCY_ANDROID: return EGL_TRUE; return EGL_TRUE; #endif default: default: return EGL_FALSE; return EGL_FALSE; } } Loading Loading @@ -2294,7 +2286,6 @@ EGLBoolean eglGetFrameTimestampSupportedANDROID( } } switch (timestamp) { switch (timestamp) { #if ENABLE_EGL_ANDROID_GET_FRAME_TIMESTAMPS case EGL_COMPOSITE_DEADLINE_ANDROID: case EGL_COMPOSITE_DEADLINE_ANDROID: case EGL_COMPOSITE_INTERVAL_ANDROID: case EGL_COMPOSITE_INTERVAL_ANDROID: case EGL_COMPOSITE_TO_PRESENT_LATENCY_ANDROID: case EGL_COMPOSITE_TO_PRESENT_LATENCY_ANDROID: Loading @@ -2319,7 +2310,6 @@ EGLBoolean eglGetFrameTimestampSupportedANDROID( NATIVE_WINDOW_FRAME_TIMESTAMPS_SUPPORTS_RETIRE, &value); NATIVE_WINDOW_FRAME_TIMESTAMPS_SUPPORTS_RETIRE, &value); return value == 0 ? EGL_FALSE : EGL_TRUE; return value == 0 ? EGL_FALSE : EGL_TRUE; } } #endif default: default: return EGL_FALSE; return EGL_FALSE; } } Loading opengl/specs/EGL_ANDROID_get_frame_timestamps.txt +25 −11 Original line number Original line Diff line number Diff line Loading @@ -8,11 +8,19 @@ Name Strings Contributors Contributors Brian Anderson Dan Stoza Pablo Ceballos Pablo Ceballos Jesse Hall Fabien Sanglard Contact Contact Brian Anderson, Google Inc. (brianderson 'at' google.com) Dan Stoza, Google Inc. (stoza 'at' google.com) Pablo Ceballos, Google Inc. (pceballos 'at' google.com) Pablo Ceballos, Google Inc. (pceballos 'at' google.com) Jesse Hall, Google Inc. (jessehall 'at' google.com) Fabien Sanglard, Google Inc. (sanglardf 'at' google.com) Status Status Loading @@ -20,7 +28,7 @@ Status Version Version Version 1, May 31, 2016 Version 1, January 13, 2017 Number Number Loading Loading @@ -96,7 +104,6 @@ Add to the list of supported tokens for eglSurfaceAttrib in section 3.5.6 enables timestamp collection, while a value of EGL_FALSE disables it. The enables timestamp collection, while a value of EGL_FALSE disables it. The initial value is false. If surface is not a window surface this has no initial value is false. If surface is not a window surface this has no effect. effect. Changes to Chapter 3 of the EGL 1.5 Specification (EGL Functions and Errors) Changes to Chapter 3 of the EGL 1.5 Specification (EGL Functions and Errors) Add a new subsection under Section 3, Add a new subsection under Section 3, Loading Loading @@ -154,6 +161,12 @@ Changes to Chapter 3 of the EGL 1.5 Specification (EGL Functions and Errors) supported will generate an EGL_BAD_PARAMETER error. If any error is supported will generate an EGL_BAD_PARAMETER error. If any error is generated the function will return EGL_FALSE. generated the function will return EGL_FALSE. The application can poll for the timestamp of particular events by calling eglGetFrameTimestamps over and over without needing to call any other EGL function between calls. This is true even for the most recently swapped frame. eglGetFrameTimestamps is thread safe and can be called from a different thread than the swapping thread. The eglGetFrameTimestampsANDROID function takes an array of timestamps to The eglGetFrameTimestampsANDROID function takes an array of timestamps to query and returns timestamps in the corresponding indices of the values query and returns timestamps in the corresponding indices of the values array. The possible timestamps that can be queried are: array. The possible timestamps that can be queried are: Loading Loading @@ -212,20 +225,21 @@ Issues Revision History Revision History #1 (Pablo Ceballos, May 31, 2016) #5 (Brian Anderson, January 13, 2017) - Initial draft. - Add eglGetCompositorTimingANDROID. #2 (Brian Anderson, July 22, 2016) #4 (Brian Anderson, January 10, 2017) - Replace EGL_QUEUE_TIME_ANDROID with EGL_REQUESTED_PRESENT_TIME_ANDROID. - Use an absolute frameId rather than a relative framesAgo. - Add DISPLAY_PRESENT_TIME_ANDROID. #3 (Brian Anderson, November 30, 2016) #3 (Brian Anderson, November 30, 2016) - Add EGL_COMPOSITION_LATCH_TIME_ANDROID, - Add EGL_COMPOSITION_LATCH_TIME_ANDROID, EGL_LAST_COMPOSITION_START_TIME_ANDROID, and EGL_LAST_COMPOSITION_START_TIME_ANDROID, and EGL_DEQUEUE_READY_TIME_ANDROID. EGL_DEQUEUE_READY_TIME_ANDROID. #4 (Brian Anderson, January 10, 2017) #2 (Brian Anderson, July 22, 2016) - Use an absolute frameId rather than a relative framesAgo. - Replace EGL_QUEUE_TIME_ANDROID with EGL_REQUESTED_PRESENT_TIME_ANDROID. - Add DISPLAY_PRESENT_TIME_ANDROID. #1 (Pablo Ceballos, May 31, 2016) - Initial draft. #5 (Brian Anderson, January 13, 2017) - Add eglGetCompositorTimingANDROID. Loading
opengl/libs/EGL/eglApi.cpp +0 −10 Original line number Original line Diff line number Diff line Loading @@ -56,8 +56,6 @@ using namespace android; using namespace android; #define ENABLE_EGL_ANDROID_GET_FRAME_TIMESTAMPS 0 // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- namespace android { namespace android { Loading Loading @@ -88,9 +86,7 @@ extern char const * const gBuiltinExtensionString = "EGL_KHR_swap_buffers_with_damage " "EGL_KHR_swap_buffers_with_damage " "EGL_ANDROID_create_native_client_buffer " "EGL_ANDROID_create_native_client_buffer " "EGL_ANDROID_front_buffer_auto_refresh " "EGL_ANDROID_front_buffer_auto_refresh " #if ENABLE_EGL_ANDROID_GET_FRAME_TIMESTAMPS "EGL_ANDROID_get_frame_timestamps " "EGL_ANDROID_get_frame_timestamps " #endif ; ; extern char const * const gExtensionString = extern char const * const gExtensionString = "EGL_KHR_image " // mandatory "EGL_KHR_image " // mandatory Loading Loading @@ -1246,7 +1242,6 @@ EGLBoolean eglSurfaceAttrib( setError(EGL_BAD_SURFACE, EGL_FALSE); setError(EGL_BAD_SURFACE, EGL_FALSE); } } #if ENABLE_EGL_ANDROID_GET_FRAME_TIMESTAMPS if (attribute == EGL_TIMESTAMPS_ANDROID) { if (attribute == EGL_TIMESTAMPS_ANDROID) { if (!s->win.get()) { if (!s->win.get()) { return setError(EGL_BAD_SURFACE, EGL_FALSE); return setError(EGL_BAD_SURFACE, EGL_FALSE); Loading @@ -1256,7 +1251,6 @@ EGLBoolean eglSurfaceAttrib( return (err == NO_ERROR) ? EGL_TRUE : return (err == NO_ERROR) ? EGL_TRUE : setError(EGL_BAD_SURFACE, EGL_FALSE); setError(EGL_BAD_SURFACE, EGL_FALSE); } } #endif if (s->cnx->egl.eglSurfaceAttrib) { if (s->cnx->egl.eglSurfaceAttrib) { return s->cnx->egl.eglSurfaceAttrib( return s->cnx->egl.eglSurfaceAttrib( Loading Loading @@ -2168,12 +2162,10 @@ EGLBoolean eglGetCompositorTimingSupportedANDROID( } } switch (name) { switch (name) { #if ENABLE_EGL_ANDROID_GET_FRAME_TIMESTAMPS case EGL_COMPOSITE_DEADLINE_ANDROID: case EGL_COMPOSITE_DEADLINE_ANDROID: case EGL_COMPOSITE_INTERVAL_ANDROID: case EGL_COMPOSITE_INTERVAL_ANDROID: case EGL_COMPOSITE_TO_PRESENT_LATENCY_ANDROID: case EGL_COMPOSITE_TO_PRESENT_LATENCY_ANDROID: return EGL_TRUE; return EGL_TRUE; #endif default: default: return EGL_FALSE; return EGL_FALSE; } } Loading Loading @@ -2294,7 +2286,6 @@ EGLBoolean eglGetFrameTimestampSupportedANDROID( } } switch (timestamp) { switch (timestamp) { #if ENABLE_EGL_ANDROID_GET_FRAME_TIMESTAMPS case EGL_COMPOSITE_DEADLINE_ANDROID: case EGL_COMPOSITE_DEADLINE_ANDROID: case EGL_COMPOSITE_INTERVAL_ANDROID: case EGL_COMPOSITE_INTERVAL_ANDROID: case EGL_COMPOSITE_TO_PRESENT_LATENCY_ANDROID: case EGL_COMPOSITE_TO_PRESENT_LATENCY_ANDROID: Loading @@ -2319,7 +2310,6 @@ EGLBoolean eglGetFrameTimestampSupportedANDROID( NATIVE_WINDOW_FRAME_TIMESTAMPS_SUPPORTS_RETIRE, &value); NATIVE_WINDOW_FRAME_TIMESTAMPS_SUPPORTS_RETIRE, &value); return value == 0 ? EGL_FALSE : EGL_TRUE; return value == 0 ? EGL_FALSE : EGL_TRUE; } } #endif default: default: return EGL_FALSE; return EGL_FALSE; } } Loading
opengl/specs/EGL_ANDROID_get_frame_timestamps.txt +25 −11 Original line number Original line Diff line number Diff line Loading @@ -8,11 +8,19 @@ Name Strings Contributors Contributors Brian Anderson Dan Stoza Pablo Ceballos Pablo Ceballos Jesse Hall Fabien Sanglard Contact Contact Brian Anderson, Google Inc. (brianderson 'at' google.com) Dan Stoza, Google Inc. (stoza 'at' google.com) Pablo Ceballos, Google Inc. (pceballos 'at' google.com) Pablo Ceballos, Google Inc. (pceballos 'at' google.com) Jesse Hall, Google Inc. (jessehall 'at' google.com) Fabien Sanglard, Google Inc. (sanglardf 'at' google.com) Status Status Loading @@ -20,7 +28,7 @@ Status Version Version Version 1, May 31, 2016 Version 1, January 13, 2017 Number Number Loading Loading @@ -96,7 +104,6 @@ Add to the list of supported tokens for eglSurfaceAttrib in section 3.5.6 enables timestamp collection, while a value of EGL_FALSE disables it. The enables timestamp collection, while a value of EGL_FALSE disables it. The initial value is false. If surface is not a window surface this has no initial value is false. If surface is not a window surface this has no effect. effect. Changes to Chapter 3 of the EGL 1.5 Specification (EGL Functions and Errors) Changes to Chapter 3 of the EGL 1.5 Specification (EGL Functions and Errors) Add a new subsection under Section 3, Add a new subsection under Section 3, Loading Loading @@ -154,6 +161,12 @@ Changes to Chapter 3 of the EGL 1.5 Specification (EGL Functions and Errors) supported will generate an EGL_BAD_PARAMETER error. If any error is supported will generate an EGL_BAD_PARAMETER error. If any error is generated the function will return EGL_FALSE. generated the function will return EGL_FALSE. The application can poll for the timestamp of particular events by calling eglGetFrameTimestamps over and over without needing to call any other EGL function between calls. This is true even for the most recently swapped frame. eglGetFrameTimestamps is thread safe and can be called from a different thread than the swapping thread. The eglGetFrameTimestampsANDROID function takes an array of timestamps to The eglGetFrameTimestampsANDROID function takes an array of timestamps to query and returns timestamps in the corresponding indices of the values query and returns timestamps in the corresponding indices of the values array. The possible timestamps that can be queried are: array. The possible timestamps that can be queried are: Loading Loading @@ -212,20 +225,21 @@ Issues Revision History Revision History #1 (Pablo Ceballos, May 31, 2016) #5 (Brian Anderson, January 13, 2017) - Initial draft. - Add eglGetCompositorTimingANDROID. #2 (Brian Anderson, July 22, 2016) #4 (Brian Anderson, January 10, 2017) - Replace EGL_QUEUE_TIME_ANDROID with EGL_REQUESTED_PRESENT_TIME_ANDROID. - Use an absolute frameId rather than a relative framesAgo. - Add DISPLAY_PRESENT_TIME_ANDROID. #3 (Brian Anderson, November 30, 2016) #3 (Brian Anderson, November 30, 2016) - Add EGL_COMPOSITION_LATCH_TIME_ANDROID, - Add EGL_COMPOSITION_LATCH_TIME_ANDROID, EGL_LAST_COMPOSITION_START_TIME_ANDROID, and EGL_LAST_COMPOSITION_START_TIME_ANDROID, and EGL_DEQUEUE_READY_TIME_ANDROID. EGL_DEQUEUE_READY_TIME_ANDROID. #4 (Brian Anderson, January 10, 2017) #2 (Brian Anderson, July 22, 2016) - Use an absolute frameId rather than a relative framesAgo. - Replace EGL_QUEUE_TIME_ANDROID with EGL_REQUESTED_PRESENT_TIME_ANDROID. - Add DISPLAY_PRESENT_TIME_ANDROID. #1 (Pablo Ceballos, May 31, 2016) - Initial draft. #5 (Brian Anderson, January 13, 2017) - Add eglGetCompositorTimingANDROID.