From e8696a40e09b24b634214684d18526187b316a2f Mon Sep 17 00:00:00 2001 From: Jamie Gennis Date: Sun, 15 Jan 2012 18:54:57 -0800 Subject: hack up frame latency measurement Change-Id: I6d9a466a23285304f0e229a5649815636ab5d6af --- opengl/libs/EGL/eglApi.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'opengl/libs/EGL/eglApi.cpp') 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 // ---------------------------------------------------------------------------- -- cgit v1.1