]> git.cworth.org Git - apitrace/commit
Capture snapshot stream in anticipation of displaying thumbnails.
authorDan McCabe <zen3d.linux@gmail.com>
Tue, 6 Mar 2012 01:20:39 +0000 (17:20 -0800)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sun, 11 Mar 2012 14:23:55 +0000 (14:23 +0000)
commit66dfdda1767b11e132c259adb6c1872dc2e1fff6
treefaaf0a7d9b933ccb5008ee890b1bebec4123a7ef
parentef0c697fddc05a99183ebb3f35caf0b76cfb3e61
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.
common/image.hpp
common/image_pnm.cpp
gui/main.cpp
gui/mainwindow.cpp
gui/mainwindow.h
gui/retracer.cpp
gui/retracer.h