Loading opengl/libs/EGL/eglApi.cpp +7 −12 Original line number Original line Diff line number Diff line Loading @@ -40,7 +40,6 @@ static inline void clearError() { EGLDisplay eglGetDisplay(EGLNativeDisplayType display) { EGLDisplay eglGetDisplay(EGLNativeDisplayType display) { ATRACE_CALL(); ATRACE_CALL(); clearError(); if (egl_init_drivers() == EGL_FALSE) { if (egl_init_drivers() == EGL_FALSE) { return setError(EGL_BAD_PARAMETER, EGL_NO_DISPLAY); return setError(EGL_BAD_PARAMETER, EGL_NO_DISPLAY); Loading @@ -48,6 +47,7 @@ EGLDisplay eglGetDisplay(EGLNativeDisplayType display) { // Call down the chain, which usually points directly to the impl // Call down the chain, which usually points directly to the impl // but may also be routed through layers // but may also be routed through layers clearError(); egl_connection_t* const cnx = &gEGLImpl; egl_connection_t* const cnx = &gEGLImpl; return cnx->platform.eglGetDisplay(display); return cnx->platform.eglGetDisplay(display); } } Loading @@ -55,7 +55,6 @@ EGLDisplay eglGetDisplay(EGLNativeDisplayType display) { EGLDisplay eglGetPlatformDisplay(EGLenum platform, EGLNativeDisplayType display, EGLDisplay eglGetPlatformDisplay(EGLenum platform, EGLNativeDisplayType display, const EGLAttrib* attrib_list) { const EGLAttrib* attrib_list) { ATRACE_CALL(); ATRACE_CALL(); clearError(); if (egl_init_drivers() == EGL_FALSE) { if (egl_init_drivers() == EGL_FALSE) { return setError(EGL_BAD_PARAMETER, EGL_NO_DISPLAY); return setError(EGL_BAD_PARAMETER, EGL_NO_DISPLAY); Loading @@ -63,6 +62,7 @@ EGLDisplay eglGetPlatformDisplay(EGLenum platform, EGLNativeDisplayType display, // Call down the chain, which usually points directly to the impl // Call down the chain, which usually points directly to the impl // but may also be routed through layers // but may also be routed through layers clearError(); egl_connection_t* const cnx = &gEGLImpl; egl_connection_t* const cnx = &gEGLImpl; return cnx->platform.eglGetPlatformDisplay(platform, display, attrib_list); return cnx->platform.eglGetPlatformDisplay(platform, display, attrib_list); } } Loading Loading @@ -239,13 +239,12 @@ __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char* procname) // in which case we must make sure we've initialized ourselves, this // in which case we must make sure we've initialized ourselves, this // happens the first time egl_get_display() is called. // happens the first time egl_get_display() is called. clearError(); if (egl_init_drivers() == EGL_FALSE) { if (egl_init_drivers() == EGL_FALSE) { setError(EGL_BAD_PARAMETER, NULL); setError(EGL_BAD_PARAMETER, NULL); return nullptr; return nullptr; } } clearError(); egl_connection_t* const cnx = &gEGLImpl; egl_connection_t* const cnx = &gEGLImpl; return cnx->platform.eglGetProcAddress(procname); return cnx->platform.eglGetProcAddress(procname); } } Loading Loading @@ -324,23 +323,21 @@ EGLBoolean eglWaitClient(void) { } } EGLBoolean eglBindAPI(EGLenum api) { EGLBoolean eglBindAPI(EGLenum api) { clearError(); if (egl_init_drivers() == EGL_FALSE) { if (egl_init_drivers() == EGL_FALSE) { return setError(EGL_BAD_PARAMETER, (EGLBoolean)EGL_FALSE); return setError(EGL_BAD_PARAMETER, (EGLBoolean)EGL_FALSE); } } clearError(); egl_connection_t* const cnx = &gEGLImpl; egl_connection_t* const cnx = &gEGLImpl; return cnx->platform.eglBindAPI(api); return cnx->platform.eglBindAPI(api); } } EGLenum eglQueryAPI(void) { EGLenum eglQueryAPI(void) { clearError(); if (egl_init_drivers() == EGL_FALSE) { if (egl_init_drivers() == EGL_FALSE) { return setError(EGL_BAD_PARAMETER, (EGLBoolean)EGL_FALSE); return setError(EGL_BAD_PARAMETER, (EGLBoolean)EGL_FALSE); } } clearError(); egl_connection_t* const cnx = &gEGLImpl; egl_connection_t* const cnx = &gEGLImpl; return cnx->platform.eglQueryAPI(); return cnx->platform.eglQueryAPI(); } } Loading Loading @@ -595,23 +592,21 @@ EGLClientBuffer eglGetNativeClientBufferANDROID(const AHardwareBuffer* buffer) { } } EGLuint64NV eglGetSystemTimeFrequencyNV() { EGLuint64NV eglGetSystemTimeFrequencyNV() { clearError(); if (egl_init_drivers() == EGL_FALSE) { if (egl_init_drivers() == EGL_FALSE) { return setError(EGL_BAD_PARAMETER, (EGLuint64NV)EGL_FALSE); return setError(EGL_BAD_PARAMETER, (EGLuint64NV)EGL_FALSE); } } clearError(); egl_connection_t* const cnx = &gEGLImpl; egl_connection_t* const cnx = &gEGLImpl; return cnx->platform.eglGetSystemTimeFrequencyNV(); return cnx->platform.eglGetSystemTimeFrequencyNV(); } } EGLuint64NV eglGetSystemTimeNV() { EGLuint64NV eglGetSystemTimeNV() { clearError(); if (egl_init_drivers() == EGL_FALSE) { if (egl_init_drivers() == EGL_FALSE) { return setError(EGL_BAD_PARAMETER, (EGLuint64NV)EGL_FALSE); return setError(EGL_BAD_PARAMETER, (EGLuint64NV)EGL_FALSE); } } clearError(); egl_connection_t* const cnx = &gEGLImpl; egl_connection_t* const cnx = &gEGLImpl; return cnx->platform.eglGetSystemTimeNV(); return cnx->platform.eglGetSystemTimeNV(); } } Loading Loading
opengl/libs/EGL/eglApi.cpp +7 −12 Original line number Original line Diff line number Diff line Loading @@ -40,7 +40,6 @@ static inline void clearError() { EGLDisplay eglGetDisplay(EGLNativeDisplayType display) { EGLDisplay eglGetDisplay(EGLNativeDisplayType display) { ATRACE_CALL(); ATRACE_CALL(); clearError(); if (egl_init_drivers() == EGL_FALSE) { if (egl_init_drivers() == EGL_FALSE) { return setError(EGL_BAD_PARAMETER, EGL_NO_DISPLAY); return setError(EGL_BAD_PARAMETER, EGL_NO_DISPLAY); Loading @@ -48,6 +47,7 @@ EGLDisplay eglGetDisplay(EGLNativeDisplayType display) { // Call down the chain, which usually points directly to the impl // Call down the chain, which usually points directly to the impl // but may also be routed through layers // but may also be routed through layers clearError(); egl_connection_t* const cnx = &gEGLImpl; egl_connection_t* const cnx = &gEGLImpl; return cnx->platform.eglGetDisplay(display); return cnx->platform.eglGetDisplay(display); } } Loading @@ -55,7 +55,6 @@ EGLDisplay eglGetDisplay(EGLNativeDisplayType display) { EGLDisplay eglGetPlatformDisplay(EGLenum platform, EGLNativeDisplayType display, EGLDisplay eglGetPlatformDisplay(EGLenum platform, EGLNativeDisplayType display, const EGLAttrib* attrib_list) { const EGLAttrib* attrib_list) { ATRACE_CALL(); ATRACE_CALL(); clearError(); if (egl_init_drivers() == EGL_FALSE) { if (egl_init_drivers() == EGL_FALSE) { return setError(EGL_BAD_PARAMETER, EGL_NO_DISPLAY); return setError(EGL_BAD_PARAMETER, EGL_NO_DISPLAY); Loading @@ -63,6 +62,7 @@ EGLDisplay eglGetPlatformDisplay(EGLenum platform, EGLNativeDisplayType display, // Call down the chain, which usually points directly to the impl // Call down the chain, which usually points directly to the impl // but may also be routed through layers // but may also be routed through layers clearError(); egl_connection_t* const cnx = &gEGLImpl; egl_connection_t* const cnx = &gEGLImpl; return cnx->platform.eglGetPlatformDisplay(platform, display, attrib_list); return cnx->platform.eglGetPlatformDisplay(platform, display, attrib_list); } } Loading Loading @@ -239,13 +239,12 @@ __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char* procname) // in which case we must make sure we've initialized ourselves, this // in which case we must make sure we've initialized ourselves, this // happens the first time egl_get_display() is called. // happens the first time egl_get_display() is called. clearError(); if (egl_init_drivers() == EGL_FALSE) { if (egl_init_drivers() == EGL_FALSE) { setError(EGL_BAD_PARAMETER, NULL); setError(EGL_BAD_PARAMETER, NULL); return nullptr; return nullptr; } } clearError(); egl_connection_t* const cnx = &gEGLImpl; egl_connection_t* const cnx = &gEGLImpl; return cnx->platform.eglGetProcAddress(procname); return cnx->platform.eglGetProcAddress(procname); } } Loading Loading @@ -324,23 +323,21 @@ EGLBoolean eglWaitClient(void) { } } EGLBoolean eglBindAPI(EGLenum api) { EGLBoolean eglBindAPI(EGLenum api) { clearError(); if (egl_init_drivers() == EGL_FALSE) { if (egl_init_drivers() == EGL_FALSE) { return setError(EGL_BAD_PARAMETER, (EGLBoolean)EGL_FALSE); return setError(EGL_BAD_PARAMETER, (EGLBoolean)EGL_FALSE); } } clearError(); egl_connection_t* const cnx = &gEGLImpl; egl_connection_t* const cnx = &gEGLImpl; return cnx->platform.eglBindAPI(api); return cnx->platform.eglBindAPI(api); } } EGLenum eglQueryAPI(void) { EGLenum eglQueryAPI(void) { clearError(); if (egl_init_drivers() == EGL_FALSE) { if (egl_init_drivers() == EGL_FALSE) { return setError(EGL_BAD_PARAMETER, (EGLBoolean)EGL_FALSE); return setError(EGL_BAD_PARAMETER, (EGLBoolean)EGL_FALSE); } } clearError(); egl_connection_t* const cnx = &gEGLImpl; egl_connection_t* const cnx = &gEGLImpl; return cnx->platform.eglQueryAPI(); return cnx->platform.eglQueryAPI(); } } Loading Loading @@ -595,23 +592,21 @@ EGLClientBuffer eglGetNativeClientBufferANDROID(const AHardwareBuffer* buffer) { } } EGLuint64NV eglGetSystemTimeFrequencyNV() { EGLuint64NV eglGetSystemTimeFrequencyNV() { clearError(); if (egl_init_drivers() == EGL_FALSE) { if (egl_init_drivers() == EGL_FALSE) { return setError(EGL_BAD_PARAMETER, (EGLuint64NV)EGL_FALSE); return setError(EGL_BAD_PARAMETER, (EGLuint64NV)EGL_FALSE); } } clearError(); egl_connection_t* const cnx = &gEGLImpl; egl_connection_t* const cnx = &gEGLImpl; return cnx->platform.eglGetSystemTimeFrequencyNV(); return cnx->platform.eglGetSystemTimeFrequencyNV(); } } EGLuint64NV eglGetSystemTimeNV() { EGLuint64NV eglGetSystemTimeNV() { clearError(); if (egl_init_drivers() == EGL_FALSE) { if (egl_init_drivers() == EGL_FALSE) { return setError(EGL_BAD_PARAMETER, (EGLuint64NV)EGL_FALSE); return setError(EGL_BAD_PARAMETER, (EGLuint64NV)EGL_FALSE); } } clearError(); egl_connection_t* const cnx = &gEGLImpl; egl_connection_t* const cnx = &gEGLImpl; return cnx->platform.eglGetSystemTimeNV(); return cnx->platform.eglGetSystemTimeNV(); } } Loading