X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=gui%2Fretracer.h;h=bb534698661bd08adeceecaeef5ec5e51e61b6ed;hb=cad5d619dcb5e1c6349bfff69176660668402622;hp=ab9e5f3a1515ab1d85fe20f2fa339360dfc6da12;hpb=66dfdda1767b11e132c259adb6c1872dc2e1fff6;p=apitrace diff --git a/gui/retracer.h b/gui/retracer.h index ab9e5f3..bb53469 100644 --- a/gui/retracer.h +++ b/gui/retracer.h @@ -8,68 +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); - - bool captureThumbnails() const; - void setCaptureThumbnails(bool enable); - -public slots: - void start(); - void terminate(); - -signals: - void finished(const QString &output); - void error(const QString &msg); - void foundState(ApiTraceState *state); - void foundThumbnails(const QList &thumbnails); - 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; - bool m_captureThumbnails; - qlonglong m_captureCall; - - QProcess *m_process; - QJson::Parser *m_jsonParser; -}; +namespace trace { struct Profile; } class Retracer : public QThread { @@ -80,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; @@ -88,6 +31,15 @@ public: bool isDoubleBuffered() const; void setDoubleBuffered(bool db); + bool isSinglethread() const; + void setSinglethread(bool singlethread); + + 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; @@ -100,25 +52,27 @@ public: signals: void finished(const QString &output); void foundState(ApiTraceState *state); - void foundThumbnails(const QList &humbnails); + 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_singlethread; bool m_captureState; bool m_captureThumbnails; qlonglong m_captureCall; - - QProcessEnvironment m_processEnvironment; + bool m_profileGpu; + bool m_profileCpu; + bool m_profilePixels; }; #endif