X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=gui%2Fretracer.h;h=915b97fe0252cf86d01d74ee7a02df775eba2a16;hb=7257dfcc57b3a1af576a8a2ca69992ae8d77dea4;hp=e5c391bcb23e91a7b5169601910589dac3d54770;hpb=48412ffde3dd4710c96d5e8d9cfdf1789e4d703a;p=apitrace diff --git a/gui/retracer.h b/gui/retracer.h index e5c391b..915b97f 100644 --- a/gui/retracer.h +++ b/gui/retracer.h @@ -8,63 +8,8 @@ #include class ApiTraceState; -namespace QJson { - class Parser; -} -/* internal class used by the retracer to run - * in the thread */ -class RetraceProcess : public QObject -{ - Q_OBJECT -public: - RetraceProcess(QObject *parent=0); - ~RetraceProcess(); - - QProcess *process() const; - - 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); - - void setCaptureAtCallNumber(qlonglong num); - qlonglong captureAtCallNumber() const; - - bool captureState() const; - void setCaptureState(bool enable); - -public slots: - void start(); - void terminate(); - -signals: - void finished(const QString &output); - void error(const QString &msg); - void foundState(ApiTraceState *state); - void retraceErrors(const QList &errors); - -private slots: - void replayFinished(int exitCode, QProcess::ExitStatus exitStatus); - void replayError(QProcess::ProcessError err); - -private: - QString m_fileName; - trace::API m_api; - bool m_benchmarking; - bool m_doubleBuffered; - bool m_captureState; - qlonglong m_captureCall; - - QProcess *m_process; - QJson::Parser *m_jsonParser; -}; +namespace trace { struct Profile; } class Retracer : public QThread { @@ -75,6 +20,9 @@ public: QString fileName() const; void setFileName(const QString &name); + QString remoteTarget() const; + void setRemoteTarget(const QString &host); + void setAPI(trace::API api); bool isBenchmarking() const; @@ -83,32 +31,44 @@ public: 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); + bool captureThumbnails() const; + void setCaptureThumbnails(bool enable); + signals: 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 cleanup(); private: QString m_fileName; + QString m_remoteTarget; trace::API m_api; bool m_benchmarking; bool m_doubleBuffered; bool m_captureState; + bool m_captureThumbnails; qlonglong m_captureCall; - - QProcessEnvironment m_processEnvironment; + bool m_profileGpu; + bool m_profileCpu; + bool m_profilePixels; }; #endif