Commit Graph

3 Commits

Author SHA1 Message Date
Siva Velusamy a73a97728b gltrace: Add support for tracing running applications.
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
2012-12-20 10:38:47 -08:00
Siva Velusamy 93a826f78f gltrace: transport buffering and context management
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
2012-01-04 11:38:37 -08:00
Siva Velusamy 0469dd6d55 glestrace: Framework for GLES tracing library
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
2011-12-02 15:30:17 -08:00