diff options
author | Jamie Gennis <jgennis@google.com> | 2012-01-15 18:54:57 -0800 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2012-01-24 15:41:50 -0800 |
commit | e8696a40e09b24b634214684d18526187b316a2f (patch) | |
tree | 3b6e438f63e0a7d9e6e1263ac7a5400a81846274 /opengl/libs/EGL/eglApi.cpp | |
parent | eeae1de29e241e38f86c1bc2035facd291b1f910 (diff) | |
download | frameworks_native-e8696a40e09b24b634214684d18526187b316a2f.zip frameworks_native-e8696a40e09b24b634214684d18526187b316a2f.tar.gz frameworks_native-e8696a40e09b24b634214684d18526187b316a2f.tar.bz2 |
hack up frame latency measurement
Change-Id: I6d9a466a23285304f0e229a5649815636ab5d6af
Diffstat (limited to 'opengl/libs/EGL/eglApi.cpp')
-rw-r--r-- | opengl/libs/EGL/eglApi.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp index 664f258..8b37da5 100644 --- a/opengl/libs/EGL/eglApi.cpp +++ b/opengl/libs/EGL/eglApi.cpp @@ -477,6 +477,26 @@ EGLBoolean eglQuerySurface( EGLDisplay dpy, EGLSurface surface, return result; } +void EGLAPI eglBeginFrame(EGLDisplay dpy, EGLSurface surface) { + clearError(); + + egl_display_t const * const dp = validate_display(dpy); + if (!dp) { + return; + } + + SurfaceRef _s(dp, surface); + if (!_s.get()) { + setError(EGL_BAD_SURFACE, EGL_FALSE); + return; + } + + int64_t timestamp = systemTime(SYSTEM_TIME_MONOTONIC); + + egl_surface_t const * const s = get_surface(surface); + native_window_set_buffers_timestamp(s->win.get(), timestamp); +} + // ---------------------------------------------------------------------------- // Contexts // ---------------------------------------------------------------------------- |