diff options
author | Romain Guy <romainguy@google.com> | 2010-08-09 20:48:09 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2010-08-10 12:22:01 -0700 |
commit | 61c8c9c5b2006d18e9310b6521c65b36ffe75ce4 (patch) | |
tree | f2a792387a3177a2e7a25290ec48bd79c62ef3e6 /opengl/libs | |
parent | 8cc82c6f4802937309dce6cba310e31358cdf6bf (diff) | |
download | frameworks_base-61c8c9c5b2006d18e9310b6521c65b36ffe75ce4.zip frameworks_base-61c8c9c5b2006d18e9310b6521c65b36ffe75ce4.tar.gz frameworks_base-61c8c9c5b2006d18e9310b6521c65b36ffe75ce4.tar.bz2 |
Fix tons of bugs and add new text rendering support.
Change-Id: I326c66b10784006f6df2f12d38e120cef94cd0d7
Diffstat (limited to 'opengl/libs')
-rw-r--r-- | opengl/libs/GLES2/gl2.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp index 924737e..a12edf2 100644 --- a/opengl/libs/GLES2/gl2.cpp +++ b/opengl/libs/GLES2/gl2.cpp @@ -39,6 +39,8 @@ using namespace android; #undef CALL_GL_API #undef CALL_GL_API_RETURN +#define DEBUG_CALL_GL_API 0 + #if USE_FAST_TLS_KEY #ifdef HAVE_ARM_TLS_REGISTER @@ -73,10 +75,24 @@ 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; \ + while ((status = glGetError()) != GL_NO_ERROR) { \ + LOGD("[" #_api "] 0x%x", status); \ + } + +#else + #define CALL_GL_API(_api, ...) \ gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \ - _c->_api(__VA_ARGS__) - + _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__) |