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
This commit is contained in:
Siva Velusamy 2012-08-16 14:41:20 -07:00
parent f0083bf528
commit ad9693f4f0

View File

@ -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();