summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--opengl/libs/EGL/eglApi.cpp6
-rw-r--r--opengl/libs/EGL/egl_platform_entries.h1
-rw-r--r--opengl/libs/EGL/egl_tls.cpp3
3 files changed, 4 insertions, 6 deletions
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 8202c4eaae..e3c708dc47 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -200,11 +200,7 @@ EGLBoolean eglWaitNative(EGLint engine) {
EGLint eglGetError(void) {
egl_connection_t* const cnx = &gEGLImpl;
- if (cnx->platform.eglGetError) {
- return cnx->platform.eglGetError();
- } else {
- return egl_tls_t::getError();
- }
+ return cnx->platform.eglGetError();
}
__eglMustCastToProperFunctionPointerType eglGetProcAddress(const char* procname) {
diff --git a/opengl/libs/EGL/egl_platform_entries.h b/opengl/libs/EGL/egl_platform_entries.h
index 7cd80d6dc2..85b1db3fae 100644
--- a/opengl/libs/EGL/egl_platform_entries.h
+++ b/opengl/libs/EGL/egl_platform_entries.h
@@ -23,6 +23,7 @@ typedef __eglMustCastToProperFunctionPointerType EGLFuncPointer;
namespace android {
+EGLint eglGetErrorImpl();
EGLFuncPointer FindPlatformImplAddr(const char* name);
}; // namespace android
diff --git a/opengl/libs/EGL/egl_tls.cpp b/opengl/libs/EGL/egl_tls.cpp
index b57c357990..aaecb62194 100644
--- a/opengl/libs/EGL/egl_tls.cpp
+++ b/opengl/libs/EGL/egl_tls.cpp
@@ -21,6 +21,7 @@
#include <cutils/properties.h>
#include <log/log.h>
#include "CallStack.h"
+#include "egl_platform_entries.h"
namespace android {
@@ -137,7 +138,7 @@ void egl_tls_t::clearTLS() {
void egl_tls_t::clearError() {
// This must clear the error from all the underlying EGL implementations as
// well as the EGL wrapper layer.
- eglGetError();
+ android::eglGetErrorImpl();
}
EGLint egl_tls_t::getError() {