George Wright [Fri, 24 Feb 2012 18:19:10 +0000 (13:19 -0500)]
Create a drawable when playing back a trace if it doesn't exist during an eglMakeCurrent
call. This is necessary for us because Firefox for Android gets its egl surface from Java,
which isn't traced.
Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
José Fonseca [Sat, 10 Mar 2012 15:37:43 +0000 (15:37 +0000)]
Bundle all headers for Khronos APIs.
We use bundled headers for all Khronos APIs, to guarantee support for both
OpenGL and OpenGL ES at build time, because the OpenGL and OpenGL ES 1 APIs
are so intertwined that conditional compilation extremely difficult. This
also avoids missing/inconsistent declarations in system headers.
This should work, given that GLEW does pretty much the same for GL.
José Fonseca [Tue, 13 Mar 2012 20:21:54 +0000 (20:21 +0000)]
Fix major regression in D3D tracing.
We don't keep reference count in the interface wrappers. Furthermore,
calling the interface wrapper's AddRef method inside other methods leads
to corrupted traces.
Dan McCabe [Tue, 6 Mar 2012 01:20:40 +0000 (17:20 -0800)]
Display captured snapshots as thumbnails.
Once snapshots are captured after being generated by glretrace, they are
then displayed in the GUI app, qapitrace.
The retracer passes a list of thumbnails to the main window. The main
window in turn binds those thumbnails to the ApiTraceFrames for later
display.
When the ApiTrace events are displayed, if a frame is being display, its
thumbnail is queried. That thumbnail is then displayed at the
front of the line for a frame.
Dan McCabe [Tue, 6 Mar 2012 01:20:39 +0000 (17:20 -0800)]
Capture snapshot stream in anticipation of displaying thumbnails.
This patch sets the stage for displaying frame thumbnails in
qapitrace by first capturing a snaphot stream.
We first prepare qapitrace to capture a snapshot stream. We enhance
replayTrace() to accept a second parameter for specifying thumbnail
capture. This then enables us to notify the retracer so set up command
line parameters to glretrace, which runs out of process. We specify that
glretrace must generate snapshots and then emit them to stdout.
After glretrace returns, we extract PNM images from the output stream.
We parse PNM the ASCII header to extract number channels, the width and
the height of the following binary image data. We then extract the
binary data of the image on a per-scanline copy. We create a QImage of
the correct size and insert the image data into the QImage. Finally, we
scale the size of the image down to the size of a thumbnail.
Lastly, we create a QList collection to hold the sequence of thumbnails.
This list is return to the main window object of qapitrace and will
later be used to display these thumbnails.
Ryan C. Gordon [Sun, 8 Jan 2012 06:32:41 +0000 (01:32 -0500)]
Add simple CPU profiling support to glretrace.
This will note the time that each traced call required, and will dump
this information during the replay, giving a basic idea of where CPU
time was spent in the GL.
Signed-off-by: José Fonseca <jose.r.fonseca@gmail.com>
Carl Worth [Mon, 14 Nov 2011 22:50:07 +0000 (14:50 -0800)]
Add "apitrace trim" command.
This adds the functionality to read in a trace and create a new
"trimmed" trace as the output. There's not yet any functionality for
selecting pieces to trim out, so the implementation is currently just
a trace copier, (which is also the name of the new supporting class).
José Fonseca [Thu, 26 Jan 2012 20:32:59 +0000 (20:32 +0000)]
Python pickle output.
Proof of concept.
This allows to process traces w/ python extremely fast, so hopefully
this should enable allow to quickly implement complex analysis in Python,
with usable performance.