From ad9693f4f0586d18a82fdbb70c6a89e43d662ff1 Mon Sep 17 00:00:00 2001 From: Siva Velusamy Date: Thu, 16 Aug 2012 14:41:20 -0700 Subject: [PATCH] gltrace: flush trace buffer on createContext & makeCurrent Certain apps (e.g. chrome) seem to create contexts which are unused for long periods of time. If tracing is stopped before those contexts are used, then the debugger never gets to know that these contexts were created. Flushing the trace after these calls ensures that the debugger knows about all created/used contexts. Change-Id: I01baa11aa56ac89eddce3c2851e4bf01076984d1 --- opengl/libs/GLES_trace/src/gltrace_context.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opengl/libs/GLES_trace/src/gltrace_context.cpp b/opengl/libs/GLES_trace/src/gltrace_context.cpp index 91b291e81..3a8deccd7 100644 --- a/opengl/libs/GLES_trace/src/gltrace_context.cpp +++ b/opengl/libs/GLES_trace/src/gltrace_context.cpp @@ -209,6 +209,8 @@ void GLTraceContext::traceGLMessage(GLMessage *msg) { GLMessage_Function func = msg->function(); if (func == GLMessage::eglSwapBuffers + || func == GLMessage::eglCreateContext + || func == GLMessage::eglMakeCurrent || func == GLMessage::glDrawArrays || func == GLMessage::glDrawElements) { mBufferedOutputStream->flush();