X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=gui%2Fretracer.h;h=af1a3d9f7b727b70f1173dcc058980bba590f6a6;hb=ebe01ce9942e570f23b40793e97cf02b6f3616ee;hp=37502e45b79e5d580396c2eb34db1bb4df592ac5;hpb=0b210a5f07344b85d9d04348daa9078db622eb6a;p=apitrace diff --git a/gui/retracer.h b/gui/retracer.h index 37502e4..af1a3d9 100644 --- a/gui/retracer.h +++ b/gui/retracer.h @@ -1,10 +1,17 @@ #ifndef RETRACER_H #define RETRACER_H -#include +#include "trace_api.hpp" +#include "apitracecall.h" + +#include #include -class Retracer : public QObject +class ApiTraceState; + +namespace trace { struct Profile; } + +class Retracer : public QThread { Q_OBJECT public: @@ -13,37 +20,51 @@ public: QString fileName() const; void setFileName(const QString &name); + void setAPI(trace::API api); + bool isBenchmarking() const; void setBenchmarking(bool bench); bool isDoubleBuffered() const; void setDoubleBuffered(bool db); + bool isProfilingGpu() const; + bool isProfilingCpu() const; + bool isProfilingPixels() const; + bool isProfiling() const; + void setProfiling(bool gpu, bool cpu, bool pixels); + void setCaptureAtCallNumber(qlonglong num); qlonglong captureAtCallNumber() const; bool captureState() const; void setCaptureState(bool enable); -public slots: - void start(); - void terminate(); + bool captureThumbnails() const; + void setCaptureThumbnails(bool enable); signals: - void finished(const QByteArray &output); + void finished(const QString &output); + void foundState(ApiTraceState *state); + void foundProfile(trace::Profile *profile); + void foundThumbnails(const QList &thumbnails); void error(const QString &msg); + void retraceErrors(const QList &errors); + +protected: + virtual void run(); -private slots: - void replayFinished(); - void replayError(QProcess::ProcessError err); private: QString m_fileName; + trace::API m_api; bool m_benchmarking; bool m_doubleBuffered; bool m_captureState; + bool m_captureThumbnails; qlonglong m_captureCall; - - QProcess *m_process; + bool m_profileGpu; + bool m_profileCpu; + bool m_profilePixels; }; #endif