am b58c6d5e: am 7e5099a9: Add compile-time option to systrace GL-ES calls

* commit 'b58c6d5ef1edcb04849d30f9b981a5f4bfd163e3':
  Add compile-time option to systrace GL-ES calls
This commit is contained in:
Jesse Hall 2012-08-13 12:16:08 -07:00 committed by Android Git Automerger
commit b4b138abaa
2 changed files with 12 additions and 1 deletions

View File

@ -122,7 +122,7 @@ LOCAL_SRC_FILES:= \
GLES2/gl2.cpp.arm \
#
LOCAL_SHARED_LIBRARIES += libcutils libEGL
LOCAL_SHARED_LIBRARIES += libcutils libutils libEGL
LOCAL_LDLIBS := -lpthread -ldl
LOCAL_MODULE:= libGLESv2

View File

@ -26,6 +26,9 @@
#include <cutils/log.h>
#include <cutils/properties.h>
#define ATRACE_TAG ATRACE_TAG_GRAPHICS
#include <utils/Trace.h>
#include "hooks.h"
#include "egl_impl.h"
@ -40,6 +43,7 @@ using namespace android;
#undef CALL_GL_API_RETURN
#define DEBUG_CALL_GL_API 0
#define SYSTRACE_CALL_GL_API 0
#if USE_FAST_TLS_KEY
@ -86,6 +90,13 @@ using namespace android;
ALOGD("[" #_api "] 0x%x", status); \
}
#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, ...) \