summaryrefslogtreecommitdiffstats
path: root/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2011-12-07 16:00:58 -0800
committerSiva Velusamy <vsiva@google.com>2011-12-07 16:00:58 -0800
commitf132ac35d82a2960542619fb3fb91d22ab256dc7 (patch)
tree80f48e0af930aebde0ae35655b39ada843772a88 /opengl/libs/GLES_trace/src/gltrace_fixup.cpp
parent3005c4f778a29028700941f07d728271d7a98b02 (diff)
downloadframeworks_native-f132ac35d82a2960542619fb3fb91d22ab256dc7.zip
frameworks_native-f132ac35d82a2960542619fb3fb91d22ab256dc7.tar.gz
frameworks_native-f132ac35d82a2960542619fb3fb91d22ab256dc7.tar.bz2
gltrace: attach contents of the appropriate framebuffer
Currently, gltrace always attaches the contents of the currently bound framebuffer. This patch changes it to attach the contents of FB0 on eglSwap, and the currently bound framebuffer for the glDraw* calls. Change-Id: Ice0520d45d75638fe61cd91149df773074216510
Diffstat (limited to 'opengl/libs/GLES_trace/src/gltrace_fixup.cpp')
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_fixup.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
index c5b0451..ec59d2f 100644
--- a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
@@ -96,10 +96,10 @@ void fixup_glGetString(GLMessage *glmsg) {
}
/* Add the contents of the framebuffer to the protobuf message */
-void fixup_addFBContents(GLMessage *glmsg) {
+void fixup_addFBContents(GLMessage *glmsg, FBBinding fbToRead) {
void *fbcontents;
unsigned fbsize, fbwidth, fbheight;
- getGLTraceContext()->getCompressedFB(&fbcontents, &fbsize, &fbwidth, &fbheight);
+ getGLTraceContext()->getCompressedFB(&fbcontents, &fbsize, &fbwidth, &fbheight, fbToRead);
GLMessage_FrameBuffer *fb = glmsg->mutable_fb();
fb->set_width(fbwidth);
@@ -299,7 +299,7 @@ void fixupGLMessage(GLMessage *glmsg) {
case GLMessage::glDrawElements:
/* void glDrawArrays(GLenum mode, GLint first, GLsizei count) */
/* void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) */
- fixup_addFBContents(glmsg);
+ fixup_addFBContents(glmsg, CURRENTLY_BOUND_FB);
break;
default:
break;