diff options
author | Mathias Agopian <mathias@google.com> | 2013-03-27 17:32:41 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2013-03-28 14:31:09 -0700 |
commit | 2bb716871cf8bfadfff1193ed798da3bffc1f8ec (patch) | |
tree | abfff54f83eea7bb88ad03790810976506e7f79f | |
parent | 12af3f6665f209cb7275f0c81fdc1cf4ccfb6208 (diff) | |
download | frameworks_native-2bb716871cf8bfadfff1193ed798da3bffc1f8ec.zip frameworks_native-2bb716871cf8bfadfff1193ed798da3bffc1f8ec.tar.gz frameworks_native-2bb716871cf8bfadfff1193ed798da3bffc1f8ec.tar.bz2 |
replace eglWaitSyncANDROID by eglWaitSyncKHR
Change-Id: I22f1b3588011c88389e249f738f1e6915cc97e72
-rw-r--r-- | libs/gui/GLConsumer.cpp | 6 | ||||
-rw-r--r-- | opengl/include/EGL/eglext.h | 8 | ||||
-rw-r--r-- | opengl/libs/EGL/eglApi.cpp | 35 | ||||
-rw-r--r-- | opengl/libs/EGL/egl_entries.in | 17 |
4 files changed, 37 insertions, 29 deletions
diff --git a/libs/gui/GLConsumer.cpp b/libs/gui/GLConsumer.cpp index 630eb7c..1ce75ea 100644 --- a/libs/gui/GLConsumer.cpp +++ b/libs/gui/GLConsumer.cpp @@ -55,10 +55,10 @@ const bool GLConsumer::sUseNativeFenceSync = true; const bool GLConsumer::sUseNativeFenceSync = false; #endif -// This compile option makes GLConsumer use the EGL_ANDROID_sync_wait +// This compile option makes GLConsumer use the EGL_KHR_wait_sync // extension to insert server-side waits into the GLES command stream. This // feature requires the EGL_ANDROID_native_fence_sync and -// EGL_ANDROID_wait_sync extensions. +// EGL_KHR_wait_sync extensions. #ifdef USE_WAIT_SYNC static const bool useWaitSync = true; #else @@ -848,7 +848,7 @@ status_t GLConsumer::doGLFenceWaitLocked() const { // XXX: The spec draft is inconsistent as to whether this should // return an EGLint or void. Ignore the return value for now, as // it's not strictly needed. - eglWaitSyncANDROID(dpy, sync, 0); + eglWaitSyncKHR(dpy, sync, 0); EGLint eglErr = eglGetError(); eglDestroySyncKHR(dpy, sync); if (eglErr != EGL_SUCCESS) { diff --git a/opengl/include/EGL/eglext.h b/opengl/include/EGL/eglext.h index 9ac7ac0..6c505ed 100644 --- a/opengl/include/EGL/eglext.h +++ b/opengl/include/EGL/eglext.h @@ -558,14 +558,6 @@ typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC)(EGLDisplay dpy, #define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285 #endif -#ifndef EGL_ANDROID_wait_sync -#define EGL_ANDROID_wait_sync -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLint EGLAPIENTRY eglWaitSyncANDROID(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); -#endif -typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCANDROID) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); -#endif - #ifndef EGL_ANDROID_presentation_time #define EGL_ANDROID_presentation_time 1 typedef khronos_stime_nanoseconds_t EGLnsecsANDROID; diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp index c1f2b2e..50b08b0 100644 --- a/opengl/libs/EGL/eglApi.cpp +++ b/opengl/libs/EGL/eglApi.cpp @@ -85,7 +85,7 @@ extern char const * const gExtensionString = "EGL_EXT_create_context_robustness " "EGL_NV_system_time " "EGL_ANDROID_image_native_buffer " // mandatory - "EGL_ANDROID_wait_sync " // strongly recommended + "EGL_KHR_wait_sync " // strongly recommended "EGL_ANDROID_presentation_time " ; @@ -133,9 +133,9 @@ static const extention_map_t sExtensionMap[] = { { "eglGetSystemTimeNV", (__eglMustCastToProperFunctionPointerType)&eglGetSystemTimeNV }, - // EGL_ANDROID_wait_sync - { "eglWaitSyncANDROID", - (__eglMustCastToProperFunctionPointerType)&eglWaitSyncANDROID }, + // EGL_KHR_wait_sync + { "eglWaitSyncKHR", + (__eglMustCastToProperFunctionPointerType)&eglWaitSyncKHR }, // EGL_ANDROID_presentation_time { "eglPresentationTimeANDROID", @@ -1364,35 +1364,36 @@ EGLBoolean eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, } // ---------------------------------------------------------------------------- -// ANDROID extensions +// EGL_EGLEXT_VERSION 15 // ---------------------------------------------------------------------------- -EGLint eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync) -{ +EGLint eglWaitSyncKHR(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_NO_NATIVE_FENCE_FD_ANDROID; + if (!dp) return EGL_FALSE; + EGLint result = EGL_FALSE; egl_connection_t* const cnx = &gEGLImpl; - if (cnx->dso && cnx->egl.eglDupNativeFenceFDANDROID) { - result = cnx->egl.eglDupNativeFenceFDANDROID(dp->disp.dpy, sync); + if (cnx->dso && cnx->egl.eglWaitSyncKHR) { + result = cnx->egl.eglWaitSyncKHR(dp->disp.dpy, sync, flags); } return result; } -EGLint eglWaitSyncANDROID(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags) +// ---------------------------------------------------------------------------- +// ANDROID extensions +// ---------------------------------------------------------------------------- + +EGLint eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync) { clearError(); const egl_display_ptr dp = validate_display(dpy); if (!dp) return EGL_NO_NATIVE_FENCE_FD_ANDROID; - EGLint result = EGL_FALSE; + EGLint result = EGL_NO_NATIVE_FENCE_FD_ANDROID; egl_connection_t* const cnx = &gEGLImpl; - if (cnx->dso && cnx->egl.eglWaitSyncANDROID) { - result = cnx->egl.eglWaitSyncANDROID(dp->disp.dpy, sync, flags); + if (cnx->dso && cnx->egl.eglDupNativeFenceFDANDROID) { + result = cnx->egl.eglDupNativeFenceFDANDROID(dp->disp.dpy, sync); } return result; } diff --git a/opengl/libs/EGL/egl_entries.in b/opengl/libs/EGL/egl_entries.in index 612c232..70d0e52 100644 --- a/opengl/libs/EGL/egl_entries.in +++ b/opengl/libs/EGL/egl_entries.in @@ -59,12 +59,27 @@ EGL_ENTRY(EGLint, eglClientWaitSyncKHR, EGLDisplay, EGLSyncKHR, EGLint, EGL_ENTRY(EGLBoolean, eglSignalSyncKHR, EGLDisplay, EGLSyncKHR, EGLenum) EGL_ENTRY(EGLBoolean, eglGetSyncAttribKHR, EGLDisplay, EGLSyncKHR, EGLint, EGLint *) +/* EGL_EGLEXT_VERSION 15 */ + +// EGL_ENTRY(EGLStreamKHR, eglCreateStreamKHR, EGLDisplay, const EGLint *) +// EGL_ENTRY(EGLBoolean, eglDestroyStreamKHR, EGLDisplay, EGLStreamKHR) +// EGL_ENTRY(EGLBoolean, eglStreamAttribKHR, EGLDisplay, EGLStreamKHR, EGLenum, EGLint) +// EGL_ENTRY(EGLBoolean, eglQueryStreamKHR, EGLDisplay, EGLStreamKHR, EGLenum, EGLint *) +// EGL_ENTRY(EGLBoolean, eglQueryStreamu64KHR, EGLDisplay, EGLStreamKHR, EGLenum, EGLuint64KHR *) +// EGL_ENTRY(EGLBoolean, eglStreamConsumerGLTextureExternalKHR, EGLDisplay, EGLStreamKHR) +// EGL_ENTRY(EGLBoolean, eglStreamConsumerAcquireKHR, EGLDisplay, EGLStreamKHR) +// EGL_ENTRY(EGLBoolean, eglStreamConsumerReleaseKHR, EGLDisplay, EGLStreamKHR) +// EGL_ENTRY(EGLSurface, eglCreateStreamProducerSurfaceKHR, EGLDisplay, EGLConfig, EGLStreamKHR, const EGLint *) +// EGL_ENTRY(EGLBoolean, eglQueryStreamTimeKHR, EGLDisplay, EGLStreamKHR, EGLenum, EGLTimeKHR*) +// EGL_ENTRY(EGLNativeFileDescriptorKHR, eglGetStreamFileDescriptorKHR, EGLDisplay, EGLStreamKHR) +// EGL_ENTRY(EGLStreamKHR, eglCreateStreamFromFileDescriptorKHR, EGLDisplay, EGLNativeFileDescriptorKHR) +EGL_ENTRY(EGLint, eglWaitSyncKHR, EGLDisplay, EGLSyncKHR, EGLint) + /* ANDROID extensions */ 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 */ |