summaryrefslogtreecommitdiffstats
path: root/opengl/libs/EGL/egl.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-07-31 16:21:17 -0700
committerMathias Agopian <mathias@google.com>2009-07-31 16:23:03 -0700
commit997d1070788e312edb4c5e5212dc90ddde7ac963 (patch)
tree80473c142d0d538d5ee61a1a8abab9ff3ed340eb /opengl/libs/EGL/egl.cpp
parentf1db4aec6569d7cf9e1fb84f1d9c1292032eac30 (diff)
downloadframeworks_base-997d1070788e312edb4c5e5212dc90ddde7ac963.zip
frameworks_base-997d1070788e312edb4c5e5212dc90ddde7ac963.tar.gz
frameworks_base-997d1070788e312edb4c5e5212dc90ddde7ac963.tar.bz2
log opengl-call-with-no-context only once per thread, instead of for each function call
Diffstat (limited to 'opengl/libs/EGL/egl.cpp')
-rw-r--r--opengl/libs/EGL/egl.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index c2003dd..236d247 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -135,9 +135,10 @@ struct egl_image_t : public egl_object_t<'_img'>
struct tls_t
{
- tls_t() : error(EGL_SUCCESS), ctx(0) { }
+ tls_t() : error(EGL_SUCCESS), ctx(0), logCallWithNoContext(EGL_TRUE) { }
EGLint error;
EGLContext ctx;
+ EGLBoolean logCallWithNoContext;
};
@@ -352,8 +353,14 @@ static int ext_context_lost() {
}
static void gl_no_context() {
- LOGE("call to OpenGL ES API with no current context");
+ tls_t* tls = getTLS();
+ if (tls->logCallWithNoContext == EGL_TRUE) {
+ tls->logCallWithNoContext = EGL_FALSE;
+ LOGE("call to OpenGL ES API with no current context "
+ "(logged once per thread)");
+ }
}
+
static void early_egl_init(void)
{
#if !USE_FAST_TLS_KEY