Add displayPresentTime to getFrameTimestamps
Makes HWC1 use displayRetireTime and HWC2 use
displayPresentTime.
Properly takes into account if HWC2On1Adapter is used.
Returns whether present or retire is supported via
eglQueryTimestampSupportedANDROID, which uses a
cached answer in Surface.
Surface::getFrameTimestamps returns with an error
if the caller requests an unsupported timestamp.
Test: adb shell /data/nativetest/libgui_test/libgui_test
--gtest_filter=*GetFrameTimestamps*
Change-Id: Ib91c2d05d7fb5cbf307e2dec1e20e79bcc19d90b
diff --git a/opengl/include/EGL/eglext.h b/opengl/include/EGL/eglext.h
index 6c802cc..b70d5b2 100644
--- a/opengl/include/EGL/eglext.h
+++ b/opengl/include/EGL/eglext.h
@@ -636,8 +636,9 @@
#define EGL_RENDERING_COMPLETE_TIME_ANDROID 0x314F
#define EGL_COMPOSITION_START_TIME_ANDROID 0x3430
#define EGL_COMPOSITION_FINISHED_TIME_ANDROID 0x3431
-#define EGL_DISPLAY_RETIRE_TIME_ANDROID 0x3432
-#define EGL_READS_DONE_TIME_ANDROID 0x3433
+#define EGL_DISPLAY_PRESENT_TIME_ANDROID 0x3432
+#define EGL_DISPLAY_RETIRE_TIME_ANDROID 0x3433
+#define EGL_READS_DONE_TIME_ANDROID 0x3434
#ifdef EGL_EGLEXT_PROTOTYPES
EGLAPI EGLBoolean eglGetFrameTimestampsANDROID(EGLDisplay dpy, EGLSurface surface, EGLint framesAgo, EGLint numTimestamps, const EGLint *timestamps, EGLnsecsANDROID *values);
EGLAPI EGLBoolean eglQueryTimestampSupportedANDROID(EGLDisplay dpy, EGLSurface surface, EGLint timestamp);