summaryrefslogtreecommitdiffstats
path: root/opengl/libs/EGL/trace.cpp
diff options
context:
space:
mode:
authorDavid Li <davidxli@google.com>2011-03-01 16:08:10 -0800
committerDavid Li <davidxli@google.com>2011-03-03 18:28:43 -0800
commit28ca2abb1ab92b2cc3a5c9119ec2f697ec3401b2 (patch)
treef6bcb82ff2a68a5bd30218326def0f95fb6734f2 /opengl/libs/EGL/trace.cpp
parente5f823ccf1cce4cab5699f1a07c1ee2290a69169 (diff)
downloadframeworks_base-28ca2abb1ab92b2cc3a5c9119ec2f697ec3401b2.zip
frameworks_base-28ca2abb1ab92b2cc3a5c9119ec2f697ec3401b2.tar.gz
frameworks_base-28ca2abb1ab92b2cc3a5c9119ec2f697ec3401b2.tar.bz2
Initial commit of GLESv2 debugger server
Use debug.egl.debug_proc property to match process cmdline. Binds to TCP:5039 and waits for client connection. Sends function call parameters, textures and shaders using Protobuf. Java Eclipse client plug-in is next. Change-Id: I183b755263663f87e86dde1ad12f527d0445fd57 Signed-off-by: David Li <davidxli@google.com>
Diffstat (limited to 'opengl/libs/EGL/trace.cpp')
-rw-r--r--opengl/libs/EGL/trace.cpp46
1 files changed, 44 insertions, 2 deletions
diff --git a/opengl/libs/EGL/trace.cpp b/opengl/libs/EGL/trace.cpp
index d3e96ba..3a1ae21 100644
--- a/opengl/libs/EGL/trace.cpp
+++ b/opengl/libs/EGL/trace.cpp
@@ -325,7 +325,7 @@ static void Tracing_ ## _api _args { \
#define TRACE_GL(_type, _api, _args, _argList, ...) \
static _type Tracing_ ## _api _args { \
- TraceGL(#_api, __VA_ARGS__); \
+ TraceGL(#_api, __VA_ARGS__); \
gl_hooks_t::gl_t const * const _c = &getGLTraceThreadSpecific()->gl; \
return _c->_api _argList; \
}
@@ -333,11 +333,11 @@ static _type Tracing_ ## _api _args { \
extern "C" {
#include "../trace.in"
}
+
#undef TRACE_GL_VOID
#undef TRACE_GL
#define GL_ENTRY(_r, _api, ...) Tracing_ ## _api,
-
EGLAPI gl_hooks_t gHooksTrace = {
{
#include "entries.in"
@@ -348,6 +348,48 @@ EGLAPI gl_hooks_t gHooksTrace = {
};
#undef GL_ENTRY
+
+#undef TRACE_GL_VOID
+#undef TRACE_GL
+
+// define the ES 1.0 Debug_gl* functions as Tracing_gl functions
+#define TRACE_GL_VOID(_api, _args, _argList, ...) \
+static void Debug_ ## _api _args { \
+ TraceGL(#_api, __VA_ARGS__); \
+ gl_hooks_t::gl_t const * const _c = &getGLTraceThreadSpecific()->gl; \
+ _c->_api _argList; \
+}
+
+#define TRACE_GL(_type, _api, _args, _argList, ...) \
+static _type Debug_ ## _api _args { \
+ TraceGL(#_api, __VA_ARGS__); \
+ gl_hooks_t::gl_t const * const _c = &getGLTraceThreadSpecific()->gl; \
+ return _c->_api _argList; \
+}
+
+extern "C" {
+#include "../debug.in"
+}
+
+#undef TRACE_GL_VOID
+#undef TRACE_GL
+
+// declare all Debug_gl* functions
+#define GL_ENTRY(_r, _api, ...) _r Debug_##_api ( __VA_ARGS__ );
+#include "../GLES2_dbg/include/glesv2_dbg.h"
+#undef GL_ENTRY
+
+#define GL_ENTRY(_r, _api, ...) Debug_ ## _api,
+EGLAPI gl_hooks_t gHooksDebug = {
+ {
+ #include "entries.in"
+ },
+ {
+ {0}
+ }
+};
+#undef GL_ENTRY
+
// ----------------------------------------------------------------------------
}; // namespace android
// ----------------------------------------------------------------------------