am cb094a78
: Merge "New compile-time flags to make debugging easier for us poor souls Bug #7195815" into jb-mr1-dev
* commit 'cb094a783f14daae3378ac8aa7dc509980f037b2': New compile-time flags to make debugging easier for us poor souls Bug #7195815
This commit is contained in:
commit
e1549fcb44
@ -29,6 +29,8 @@
|
|||||||
#define ATRACE_TAG ATRACE_TAG_GRAPHICS
|
#define ATRACE_TAG ATRACE_TAG_GRAPHICS
|
||||||
#include <utils/Trace.h>
|
#include <utils/Trace.h>
|
||||||
|
|
||||||
|
#include <utils/CallStack.h>
|
||||||
|
|
||||||
#include "hooks.h"
|
#include "hooks.h"
|
||||||
#include "egl_impl.h"
|
#include "egl_impl.h"
|
||||||
|
|
||||||
@ -43,9 +45,10 @@ using namespace android;
|
|||||||
#undef CALL_GL_API_RETURN
|
#undef CALL_GL_API_RETURN
|
||||||
|
|
||||||
#define DEBUG_CALL_GL_API 0
|
#define DEBUG_CALL_GL_API 0
|
||||||
|
#define DEBUG_PRINT_CALL_STACK_ON_ERROR 0
|
||||||
#define SYSTRACE_CALL_GL_API 0
|
#define SYSTRACE_CALL_GL_API 0
|
||||||
|
|
||||||
#if USE_FAST_TLS_KEY
|
#if USE_FAST_TLS_KEY___
|
||||||
|
|
||||||
#ifdef HAVE_ARM_TLS_REGISTER
|
#ifdef HAVE_ARM_TLS_REGISTER
|
||||||
#define GET_TLS(reg) \
|
#define GET_TLS(reg) \
|
||||||
@ -86,8 +89,15 @@ using namespace android;
|
|||||||
gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \
|
gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \
|
||||||
_c->_api(__VA_ARGS__); \
|
_c->_api(__VA_ARGS__); \
|
||||||
GLenum status = GL_NO_ERROR; \
|
GLenum status = GL_NO_ERROR; \
|
||||||
|
bool error = false; \
|
||||||
while ((status = glGetError()) != GL_NO_ERROR) { \
|
while ((status = glGetError()) != GL_NO_ERROR) { \
|
||||||
ALOGD("[" #_api "] 0x%x", status); \
|
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
|
#elif SYSTRACE_CALL_GL_API
|
||||||
|
Loading…
Reference in New Issue
Block a user