summaryrefslogtreecommitdiffstats
path: root/opengl/libs/GLES2
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-10-18 16:16:10 -0700
committerRomain Guy <romainguy@google.com>2012-10-18 16:16:10 -0700
commit16928bfeca8858a0acae6942fc68c14a040b92ff (patch)
tree6c262da307c7417170f4d547401cdc475bbd3974 /opengl/libs/GLES2
parent7f79a2bd5c92bc626890dc16ffb8cd2de934e5fb (diff)
downloadframeworks_native-16928bfeca8858a0acae6942fc68c14a040b92ff.zip
frameworks_native-16928bfeca8858a0acae6942fc68c14a040b92ff.tar.gz
frameworks_native-16928bfeca8858a0acae6942fc68c14a040b92ff.tar.bz2
Add runtime debugging capabilities to OpenGL
The shell property debug.egl.trace can now be set to: 0 disables tracing 1 logs all GL calls error checks glGetError after every GL call, logs a stack trace on error systrace logs each GL call to systrace Change-Id: I34a2a2d4e19c373fd9eaa1b0cd93e67c87378996
Diffstat (limited to 'opengl/libs/GLES2')
-rw-r--r--opengl/libs/GLES2/gl2.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp
index 2d0045e..55ef499 100644
--- a/opengl/libs/GLES2/gl2.cpp
+++ b/opengl/libs/GLES2/gl2.cpp
@@ -26,11 +26,6 @@
#include <cutils/log.h>
#include <cutils/properties.h>
-#define ATRACE_TAG ATRACE_TAG_GRAPHICS
-#include <utils/Trace.h>
-
-#include <utils/CallStack.h>
-
#include "hooks.h"
#include "egl_impl.h"
@@ -44,10 +39,6 @@ using namespace android;
#undef CALL_GL_API
#undef CALL_GL_API_RETURN
-#define DEBUG_CALL_GL_API 0
-#define DEBUG_PRINT_CALL_STACK_ON_ERROR 0
-#define SYSTRACE_CALL_GL_API 0
-
#if USE_FAST_TLS_KEY
#ifdef HAVE_ARM_TLS_REGISTER
@@ -83,38 +74,10 @@ using namespace android;
#define API_ENTRY(_api) _api
-#if DEBUG_CALL_GL_API
-
#define CALL_GL_API(_api, ...) \
gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \
- _c->_api(__VA_ARGS__); \
- GLenum status = GL_NO_ERROR; \
- bool error = false; \
- while ((status = glGetError()) != GL_NO_ERROR) { \
- ALOGD("[" #_api "] 0x%x", status); \
- error = true; \
- } \
- if (DEBUG_PRINT_CALL_STACK_ON_ERROR && error) { \
- CallStack s; \
- s.update(); \
- s.dump("glGetError:" #_api); \
- }
-
-#elif SYSTRACE_CALL_GL_API
-
- #define CALL_GL_API(_api, ...) \
- ATRACE_CALL(); \
- gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \
_c->_api(__VA_ARGS__);
-#else
-
- #define CALL_GL_API(_api, ...) \
- gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \
- _c->_api(__VA_ARGS__);
-
-#endif
-
#define CALL_GL_API_RETURN(_api, ...) \
gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \
return _c->_api(__VA_ARGS__)