diff options
author | Jamie Gennis <jgennis@google.com> | 2012-09-09 17:46:17 -0700 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2012-09-09 17:52:18 -0700 |
commit | 010dd4fb892aecf71e4631c22148fe57ef5b3958 (patch) | |
tree | 430b7f1a682b32e7b1d2e86c03779d182ef22cd9 /opengl/libs/EGL | |
parent | 605f90dc867a18f1ea06203ffa70916f70820f92 (diff) | |
download | frameworks_native-010dd4fb892aecf71e4631c22148fe57ef5b3958.zip frameworks_native-010dd4fb892aecf71e4631c22148fe57ef5b3958.tar.gz frameworks_native-010dd4fb892aecf71e4631c22148fe57ef5b3958.tar.bz2 |
EGL: Add the EGL_ANDROID_wait_sync extension
Change-Id: Ie9a78e07fcaf27c5c13797141ad3c692217607fb
Diffstat (limited to 'opengl/libs/EGL')
-rw-r--r-- | opengl/libs/EGL/eglApi.cpp | 16 | ||||
-rw-r--r-- | opengl/libs/EGL/egl_entries.in | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp index 014ac61..91b4567 100644 --- a/opengl/libs/EGL/eglApi.cpp +++ b/opengl/libs/EGL/eglApi.cpp @@ -653,6 +653,7 @@ __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname) // internally by the Android EGL layer. if (!strcmp(procname, "eglSetBlobCacheFuncsANDROID") || !strcmp(procname, "eglDupNativeFenceFDANDROID") || + !strcmp(procname, "eglWaitSyncANDROID") || !strcmp(procname, "eglHibernateProcessIMG") || !strcmp(procname, "eglAwakenProcessIMG")) { return NULL; @@ -1206,6 +1207,21 @@ EGLint eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync) return result; } +EGLint eglWaitSyncANDROID(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags) +{ + clearError(); + + const egl_display_ptr dp = validate_display(dpy); + if (!dp) return EGL_NO_NATIVE_FENCE_FD_ANDROID; + + EGLint result = EGL_FALSE; + egl_connection_t* const cnx = &gEGLImpl; + if (cnx->dso && cnx->egl.eglWaitSyncANDROID) { + result = cnx->egl.eglWaitSyncANDROID(dp->disp.dpy, sync, flags); + } + return result; +} + // ---------------------------------------------------------------------------- // NVIDIA extensions // ---------------------------------------------------------------------------- diff --git a/opengl/libs/EGL/egl_entries.in b/opengl/libs/EGL/egl_entries.in index 4cbd55f..2ffd417 100644 --- a/opengl/libs/EGL/egl_entries.in +++ b/opengl/libs/EGL/egl_entries.in @@ -63,6 +63,7 @@ EGL_ENTRY(EGLBoolean, eglGetSyncAttribKHR, EGLDisplay, EGLSyncKHR, EGLint, EGL_ENTRY(EGLBoolean, eglSetSwapRectangleANDROID, EGLDisplay, EGLSurface, EGLint, EGLint, EGLint, EGLint) EGL_ENTRY(EGLClientBuffer, eglGetRenderBufferANDROID, EGLDisplay, EGLSurface) EGL_ENTRY(EGLint, eglDupNativeFenceFDANDROID, EGLDisplay, EGLSyncKHR) +EGL_ENTRY(EGLint, eglWaitSyncANDROID, EGLDisplay, EGLSyncKHR, EGLint) /* NVIDIA extensions */ |