diff options
author | Andy McFadden <fadden@android.com> | 2013-03-01 16:25:32 -0800 |
---|---|---|
committer | Andy McFadden <fadden@android.com> | 2013-03-05 10:10:59 -0800 |
commit | 7284145d564fa8a422a8e564a38c730fb4a2962b (patch) | |
tree | 2718dc96c11b65724204c669c873645fb37556af /opengl/libs/EGL | |
parent | 306f18c5fb15ac05db09ece7241af02b9713a23d (diff) | |
download | frameworks_native-7284145d564fa8a422a8e564a38c730fb4a2962b.zip frameworks_native-7284145d564fa8a422a8e564a38c730fb4a2962b.tar.gz frameworks_native-7284145d564fa8a422a8e564a38c730fb4a2962b.tar.bz2 |
Add eglPresentationTimeANDROID
Added EGL extension to set a timestamp on a surface.
Also, fix JNI encoding of "long" in glgen.
Bug 8191230
Change-Id: I38b7334bade3f8ff02bffe600bb74469ef22c164
Diffstat (limited to 'opengl/libs/EGL')
-rw-r--r-- | opengl/libs/EGL/eglApi.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp index ed9db94..978ab04 100644 --- a/opengl/libs/EGL/eglApi.cpp +++ b/opengl/libs/EGL/eglApi.cpp @@ -1307,6 +1307,28 @@ EGLint eglWaitSyncANDROID(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags) return result; } +EGLBoolean eglPresentationTimeANDROID(EGLDisplay dpy, EGLSurface surface, + EGLnsecsANDROID time) +{ + clearError(); + + const egl_display_ptr dp = validate_display(dpy); + if (!dp) { + return EGL_FALSE; + } + + SurfaceRef _s(dp.get(), surface); + if (!_s.get()) { + setError(EGL_BAD_SURFACE, EGL_FALSE); + return EGL_FALSE; + } + + egl_surface_t const * const s = get_surface(surface); + native_window_set_buffers_timestamp(s->win.get(), time); + + return EGL_TRUE; +} + // ---------------------------------------------------------------------------- // NVIDIA extensions // ---------------------------------------------------------------------------- |