summaryrefslogtreecommitdiff
path: root/gui/retracer.h
AgeCommit message (Collapse)AuthorFilesLines
2016-03-05gui: clang-modernize.Jose Fonseca1-1/+1
2015-05-20common,cli,wrappers,retrace,gui: Use #pragma once.Jose Fonseca1-4/+1
Smaller footprint, and simplifies refactoring.
2015-03-14gui: Handle Android retrace in GUI.BogDan Vatra1-3/+5
- allow the user to choose and pull a file from device and use open it in ApiTrace GUI. - allow the user to choose a local (EGL) file and push it to the device for retrace. - allow the user link a local file with a file on the device. - retrace on android.
2015-01-26gui: Create a call set for thumbnails requested.Dan McCabe1-0/+2
Retracer now knows what thumbnails are needed. This information needs to be communicated to the glretrace command. Construct a string that contains the call numbers for all missing thumbnails. The constructed string is then passed to glretrace with the "-S" argument. TODO: we want to be able to detect contiguous sequences of calls and emit them as a range. However, I wasn't able to get this working correctly and will defer this to a future patch.
2015-01-26gui: Prepare to receive sparse thumbnail data.Dan McCabe1-0/+2
The previous implementation assumed that all frame thumbnails would be provided to the trace by the retracer. Now, not only are just a subset of frame thumbnails being provided, but call thumbnails may also be present, depending on where the user was looking. Therefore, rather than process a list of thumbnails, one for each frame, this patch modifies the code to process a hash table of thumbnails which is addressed by the call index. In addition, the code now needs to extract the call index that was encoded by glretrace as an image comment. Therefore, the PNM parser will now attempt to interpret the comment in the PNM header as a number and return it in addition to the other header data. In order for Qt to manage the modified message data, main.cpp now has to define a different data packet as well (ImageHash). I tried to not define that new type but the Qt preprocessor didn't like the two type parameters I was using. Finally, ApiTrace::bindThumbnails is made more generic to deal with the sparse data in the hash table as well as potentially assign call thumbnails as well as frame thumbnails. v2: Attach inner thumbnails to the right call. Calls may be filtered, so it's not possible to find the right call merely by indexing. -- Jose
2015-01-26gui: Notify retracer of missing thumbnails to capture.Dan McCabe1-0/+7
Now that the trace knows what thumbnails are needed, that information needs to be communicated to the retracer to actually capture them. The trace is modified to iterate through the missing thumbnails. For each of these thumbnail indices, the trace calls a callback to notify it of the thumbnail. I don't really like my solution to this but I couldn't figure out a better one. What I wanted to do was have the trace hand out an iterator along the lines of what Java or C# do, but I couldn't figure out how to create one. If the reviewers of this code have a suggestion, I'm all ears. The main window provides the callback and acts as an intermediate to the retracer. The callback receives the missing index and passes it to the retracer, which then adds the index to the collection of missing thumbnail indices it is gathering.
2014-02-03qapitrace: Add option to retrace with core profile.Corey Richardson1-0/+4
This was preventing using qapitrace to debug issues using Mesa. The application being debugged used GL 3.3, but since a core profile wasn't requested, the max Mesa would give was 3.0.
2013-07-20qapitrace: Add option to replay in singlethreaded modePeter Lohrmann1-0/+4
Some traces fail to replay (hang) if glretrace does not have --singelthread on the command line, this change makes a UI option available.
2013-04-12qapitrace: Support executing glretrace on a remote target host.Carl Worth1-0/+4
This is supported with a new command-line argument: qapitrace --remote-target <HOST> <trace-file> See README.markdown for documentation on usage and current limitations of this feature.
2012-12-09qapitrace: Adjust PATH only once and for all.José Fonseca1-2/+0
2012-08-08Add gui support for trace profiling.James Benton1-0/+12
2012-03-26Fix includes.José Fonseca1-0/+1
2012-03-25Get JSON state to not be fully buffered into memory.José Fonseca1-1/+0
2012-03-25Don't buffer all stdout from retrace when generating thumbnails.José Fonseca1-64/+0
2012-03-24Avoid QImage object copies by using references.José Fonseca1-1/+1
2012-03-11Capture snapshot stream in anticipation of displaying thumbnails.Dan McCabe1-0/+10
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.
2011-11-27Allow to retrace with EGL too.José Fonseca1-0/+7
2011-11-24Prevent segfault on glretrace crash (fixes issue #52).José Fonseca1-1/+1
On glretrace crash, both error and finished QProcess events are emitted, by this order. Members were reset on error, causing null pointer dereference on replayFinished. Fix this by handling abnormal termination on replayFinished too. replayError should probably removed/merged into replayFinished.
2011-09-14Properly handle and propagate retrace errors.Zack Rusin1-8/+4
2011-08-28Reduce the size of ApiTraceCall, ApiTraceEvent and ApiTraceFrameZack Rusin1-2/+2
This gets down the memory usage down quite a bit.
2011-04-19Large chunk of showing the replay errors.Zack Rusin1-0/+8
2011-04-10Replay and parse json in a thread.Zack Rusin1-4/+58
2011-04-06Abstract retracing into a class of its own.Zack Rusin1-0/+49
preparing for adding options to benchmark and use double buffering from the gui.