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 | b335fad4705348ff78d764fb4be53dcbe6b67abe (patch) | |
tree | 0ead32dd0e0e2c74b4e2539a93deacf485f99901 /opengl/libs | |
parent | fa1a91628a706bbe51d91e0ccb9144df8b8529e6 (diff) | |
download | frameworks_base-b335fad4705348ff78d764fb4be53dcbe6b67abe.zip frameworks_base-b335fad4705348ff78d764fb4be53dcbe6b67abe.tar.gz frameworks_base-b335fad4705348ff78d764fb4be53dcbe6b67abe.tar.bz2 |
hack up frame latency measurement
Change-Id: I6d9a466a23285304f0e229a5649815636ab5d6af
Diffstat (limited to 'opengl/libs')
-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 // ---------------------------------------------------------------------------- |