Currently, to activate OpenGL tracing, an application has to be
start with --opengl-trace option (or have a debug prop set).
This CL adds support for tracing an application which may already
be running. This is implemented as follows:
- DDMS initiates a JDWP message to the VM indicating that
opengl traces be enabled.
- When that message is received, a flag is set that indicates
that tracing should be enabled.
- The trace flag is checked during every eglSwap() operation,
and if it finds that tracing should be active and it isn't,
then it starts the tracing component.
Change-Id: I3347fe89fc06c7404d7aa9360f4b21e5bf36ebcb
This patch adds two improvements:
1. Protobuf messages are buffered and sent in chunks.
2. Multiple EGL contexts are handled properly: Corresponding
to each EGLContext, a GLTraceContext with a unique ID is created.
On eglMakeCurrent, the appropriate GLTraceContext is set and is
used while tracing subsequent GL Calls in that thread.
Change-Id: I34076376d3e5af205c87c7396ea47659844abd6e
This patch provides a framework for tracing GLES 1.0 and 2.0
functions. It is missing a lot of features, but here are the
things it accomplishes:
- Stop building the glesv2dbg library, and build the
glestrace library instead.
- Replace the hooks for glesv2dbg with the ones for glestrace.
- Add the basics for the trace library. Currently, this
traces all GL functions, but not all required data is
sent for all the functions. As a result, it will not
be possible to reconstruct the entire GL state on the
host side.
The files gltrace.pb.* and gltrace_api.* are both generated
using the tools/genapi.py script.
Change-Id: Id60a468f7278657f008bc6ea1df01f9bdfecfdd3