summaryrefslogtreecommitdiffstats
path: root/opengl/libs/EGL/egl.cpp
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2011-01-30 16:50:04 -0800
committerJamie Gennis <jgennis@google.com>2011-01-31 14:08:23 -0800
commite3b179c732fde81da0bffecd9579cafd727b3417 (patch)
tree87c4098fd50934d76e38a325014745f6f409482e /opengl/libs/EGL/egl.cpp
parenta3b5960f6f28a81cd63abd69adcdfb5dcc05aa30 (diff)
downloadframeworks_base-e3b179c732fde81da0bffecd9579cafd727b3417.zip
frameworks_base-e3b179c732fde81da0bffecd9579cafd727b3417.tar.gz
frameworks_base-e3b179c732fde81da0bffecd9579cafd727b3417.tar.bz2
Clear all EGL errors when entering EGL funcs.
This changes the clearError function in the EGL wrapper layer to simply call eglGetError(). That should clear any pending errors from all the underlying EGL implementations, which is needed to correctly report the error for the most recently called EGL function. Change-Id: Iad19c69f0c5305e873f3c2f96d353280d31f7b61
Diffstat (limited to 'opengl/libs/EGL/egl.cpp')
-rw-r--r--opengl/libs/EGL/egl.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index 8977fbf..3dc8c03 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -389,10 +389,9 @@ static tls_t* getTLS()
}
static inline void clearError() {
- if (gEGLThreadLocalStorageKey != -1) {
- tls_t* tls = getTLS();
- tls->error = EGL_SUCCESS;
- }
+ // This must clear the error from all the underlying EGL implementations as
+ // well as the EGL wrapper layer.
+ eglGetError();
}
template<typename T>