diff options
author | David Li <davidxli@google.com> | 2011-04-08 18:41:00 -0700 |
---|---|---|
committer | David Li <davidxli@google.com> | 2011-04-12 15:56:10 -0700 |
commit | e2ad4d0e3748c2f0180d24d1b3468aac79adac3a (patch) | |
tree | bfa8647edf051ce768ee9c855d7d488924fc1377 /opengl/libs/GLES2_dbg/src/api.h | |
parent | ce30eb8a90a1ac458e15e773057a8a73b0918ae6 (diff) | |
download | frameworks_base-e2ad4d0e3748c2f0180d24d1b3468aac79adac3a.zip frameworks_base-e2ad4d0e3748c2f0180d24d1b3468aac79adac3a.tar.gz frameworks_base-e2ad4d0e3748c2f0180d24d1b3468aac79adac3a.tar.bz2 |
GLES2Dbg: add EXTEND_AFTER_CALL_Debug_* macro and improve protocol
To allow auto generate of Debug_glReadPixels function.
Also added AfterGeneratedCall messag type, and client override
of expectResponse for improving protocol.
Also implemented callers for client to get shader/program iv & infolog
Change-Id: I8426de0be4b7ffcb8b2b4f063ad85d19a9d2d72e
Signed-off-by: David Li <davidxli@google.com>
Diffstat (limited to 'opengl/libs/GLES2_dbg/src/api.h')
-rw-r--r-- | opengl/libs/GLES2_dbg/src/api.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/opengl/libs/GLES2_dbg/src/api.h b/opengl/libs/GLES2_dbg/src/api.h index b9fc341..2afbe35 100644 --- a/opengl/libs/GLES2_dbg/src/api.h +++ b/opengl/libs/GLES2_dbg/src/api.h @@ -29,6 +29,19 @@ #define EXTEND_Debug_glCopyTexSubImage2D EXTEND_Debug_glCopyTexImage2D +#define EXTEND_AFTER_CALL_Debug_glReadPixels \ + { \ + DbgContext * const dbg = getDbgContextThreadSpecific(); \ + if (dbg->IsReadPixelBuffer(pixels)) { \ + dbg->CompressReadPixelBuffer(msg.mutable_data()); \ + msg.set_data_type(msg.ReferencedImage); \ + } else { \ + const unsigned int size = width * height * GetBytesPerPixel(format, type); \ + dbg->Compress(pixels, size, msg.mutable_data()); \ + msg.set_data_type(msg.NonreferencedImage); \ + } \ + } + #define EXTEND_Debug_glShaderSource \ std::string * const data = msg.mutable_data(); \ for (unsigned i = 0; i < count; i++) \ |