GLES2Debugger: Make command exchange async to improve performance.
In message loop, use select to check for available commands from client,
rather than always expecting commands in eglSwapBuffers.
Change-Id: Ifc34dd77c2528c8b9c71f594e3eda4f93400cd2b
Signed-off-by: David Li <davidxli@google.com>
diff --git a/opengl/libs/GLES2_dbg/src/header.h b/opengl/libs/GLES2_dbg/src/header.h
index cbd448a..b79cc0f 100644
--- a/opengl/libs/GLES2_dbg/src/header.h
+++ b/opengl/libs/GLES2_dbg/src/header.h
@@ -113,7 +113,7 @@
virtual ~FunctionCall() {}
};
-// move these into DbgContext
+// move these into DbgContext as static
extern bool capture;
extern int timeMode; // SYSTEM_TIME_
@@ -121,8 +121,10 @@
unsigned GetBytesPerPixel(const GLenum format, const GLenum type);
+// every Debug_gl* function calls this to send message to client and possibly receive commands
int * MessageLoop(FunctionCall & functionCall, glesv2debugger::Message & msg,
const bool expectResponse, const glesv2debugger::Message_Function function);
+
void Receive(glesv2debugger::Message & cmd);
float Send(const glesv2debugger::Message & msg, glesv2debugger::Message & cmd);
void SetProp(const glesv2debugger::Message & cmd);