summaryrefslogtreecommitdiffstats
path: root/opengl/libs
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-10-05 19:15:05 -0700
committerMathias Agopian <mathias@google.com>2011-10-05 19:15:32 -0700
commit97bc75d42c2a03a68c46c134f16fd64d8f2ce657 (patch)
treed018c829cce10cb593d56e49f738102180c834f9 /opengl/libs
parent94d2f366f971bc052da9856e9f8867094e738cd1 (diff)
downloadframeworks_base-97bc75d42c2a03a68c46c134f16fd64d8f2ce657.zip
frameworks_base-97bc75d42c2a03a68c46c134f16fd64d8f2ce657.tar.gz
frameworks_base-97bc75d42c2a03a68c46c134f16fd64d8f2ce657.tar.bz2
don't log EGL errors due to unimplemented proprietary extensions
Change-Id: Icfc33d4f55d1e7fb49390ce0921ba37a438c9fc2
Diffstat (limited to 'opengl/libs')
-rw-r--r--opengl/libs/EGL/eglApi.cpp4
-rw-r--r--opengl/libs/EGL/egl_tls.cpp22
-rw-r--r--opengl/libs/EGL/egl_tls.h13
3 files changed, 24 insertions, 15 deletions
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 23f67d5..1f9ce68 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -1480,7 +1480,7 @@ EGLuint64NV eglGetSystemTimeFrequencyNV()
}
}
- return setError(EGL_BAD_DISPLAY, 0);;
+ return setErrorQuiet(EGL_BAD_DISPLAY, 0);
}
EGLuint64NV eglGetSystemTimeNV()
@@ -1500,5 +1500,5 @@ EGLuint64NV eglGetSystemTimeNV()
}
}
- return setError(EGL_BAD_DISPLAY, 0);;
+ return setErrorQuiet(EGL_BAD_DISPLAY, 0);
}
diff --git a/opengl/libs/EGL/egl_tls.cpp b/opengl/libs/EGL/egl_tls.cpp
index f3c8d2c..b341ddb 100644
--- a/opengl/libs/EGL/egl_tls.cpp
+++ b/opengl/libs/EGL/egl_tls.cpp
@@ -67,19 +67,23 @@ void egl_tls_t::validateTLSKey()
}
}
-void egl_tls_t::setErrorEtcImpl(const char* caller, int line, EGLint error) {
+void egl_tls_t::setErrorEtcImpl(
+ const char* caller, int line, EGLint error, bool quiet) {
validateTLSKey();
egl_tls_t* tls = getTLS();
if (tls->error != error) {
- LOGE("%s:%d error %x (%s)", caller, line, error, egl_strerror(error));
- tls->error = error;
- char value[PROPERTY_VALUE_MAX];
- property_get("debug.egl.callstack", value, "0");
- if (atoi(value)) {
- CallStack stack;
- stack.update();
- stack.dump();
+ if (!quiet) {
+ LOGE("%s:%d error %x (%s)",
+ caller, line, error, egl_strerror(error));
+ char value[PROPERTY_VALUE_MAX];
+ property_get("debug.egl.callstack", value, "0");
+ if (atoi(value)) {
+ CallStack stack;
+ stack.update();
+ stack.dump();
+ }
}
+ tls->error = error;
}
}
diff --git a/opengl/libs/EGL/egl_tls.h b/opengl/libs/EGL/egl_tls.h
index a7989ef..78b0b2f 100644
--- a/opengl/libs/EGL/egl_tls.h
+++ b/opengl/libs/EGL/egl_tls.h
@@ -41,7 +41,8 @@ class egl_tls_t {
egl_tls_t();
static void validateTLSKey();
- static void setErrorEtcImpl(const char* caller, int line, EGLint error);
+ static void setErrorEtcImpl(
+ const char* caller, int line, EGLint error, bool quiet);
public:
static egl_tls_t* getTLS();
@@ -55,13 +56,17 @@ public:
template<typename T>
static T setErrorEtc(const char* caller,
- int line, EGLint error, T returnValue) {
- setErrorEtcImpl(caller, line, error);
+ int line, EGLint error, T returnValue, bool quiet = false) {
+ setErrorEtcImpl(caller, line, error, quiet);
return returnValue;
}
};
-#define setError(_e, _r) egl_tls_t::setErrorEtc(__FUNCTION__, __LINE__, _e, _r)
+#define setError(_e, _r) \
+ egl_tls_t::setErrorEtc(__FUNCTION__, __LINE__, _e, _r)
+
+#define setErrorQuiet(_e, _r) \
+ egl_tls_t::setErrorEtc(__FUNCTION__, __LINE__, _e, _r, true)
// ----------------------------------------------------------------------------