diff options
author | Siva Velusamy <vsiva@google.com> | 2012-01-03 14:39:31 -0800 |
---|---|---|
committer | Siva Velusamy <vsiva@google.com> | 2012-01-04 12:50:13 -0800 |
commit | 3f194e6e3a62cbb846e8948eac8e4ce9aa7444a6 (patch) | |
tree | 197a1bd990333021bf7e1dcf4f030b521b902fce /opengl/libs/GLES_trace/src/gltrace_fixup.cpp | |
parent | 875bdea8be31e31408ab972e2a073b215c13ca63 (diff) | |
download | frameworks_native-3f194e6e3a62cbb846e8948eac8e4ce9aa7444a6.zip frameworks_native-3f194e6e3a62cbb846e8948eac8e4ce9aa7444a6.tar.gz frameworks_native-3f194e6e3a62cbb846e8948eac8e4ce9aa7444a6.tar.bz2 |
gltrace: add user settings to control data captured.
Currently users do not have control over the amount of data
captured during tracing. This patch adds 3 settings that users
can enable/disable at runtime:
- capture framebuffer on eglSwap() calls
- capture framebuffer on glDraw*() calls
- capture texture data passed to glTexImage*() calls
Disabling these options when not needed signficantly decreases
the size of the trace file, and reduces performance overhead for
the running application.
These settings are stored in the per process GLTraceState.
A separate thread listens for commands from the host, and updates
the state based on the user commands.
Change-Id: Ic4518b94e8bcbc5330ac7138153721caa98b365d
Diffstat (limited to 'opengl/libs/GLES_trace/src/gltrace_fixup.cpp')
-rw-r--r-- | opengl/libs/GLES_trace/src/gltrace_fixup.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp index 7fbae1d..5a439e3 100644 --- a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp +++ b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp @@ -283,7 +283,9 @@ void fixupGLMessage(GLTraceContext *context, nsecs_t start, nsecs_t end, GLMessa fixup_glGetString(glmsg); break; case GLMessage::glTexImage2D: - fixup_glTexImage2D(glmsg); + if (context->getGlobalTraceState()->shouldCollectTextureDataOnGlTexImage()) { + fixup_glTexImage2D(glmsg); + } break; case GLMessage::glShaderSource: fixup_glShaderSource(glmsg); @@ -304,10 +306,16 @@ void fixupGLMessage(GLTraceContext *context, nsecs_t start, nsecs_t end, GLMessa fixup_glUniformMatrixGeneric(4, glmsg); break; case GLMessage::glDrawArrays: - case GLMessage::glDrawElements: /* void glDrawArrays(GLenum mode, GLint first, GLsizei count) */ + if (context->getGlobalTraceState()->shouldCollectFbOnGlDraw()) { + fixup_addFBContents(context, glmsg, CURRENTLY_BOUND_FB); + } + break; + case GLMessage::glDrawElements: /* void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) */ - fixup_addFBContents(context, glmsg, CURRENTLY_BOUND_FB); + if (context->getGlobalTraceState()->shouldCollectFbOnGlDraw()) { + fixup_addFBContents(context, glmsg, CURRENTLY_BOUND_FB); + } break; default: break; |