]> git.cworth.org Git - apitrace/blobdiff - retrace/retrace.hpp
retrace: Allow multiple dumpers to co-exist.
[apitrace] / retrace / retrace.hpp
index a019de787cae5de55432ba2797f9355cca45c3ad..ab1ba5c20dd7af242f226c8386b4201b898518fb 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "trace_model.hpp"
 #include "trace_parser.hpp"
+#include "trace_profiler.hpp"
 
 
 namespace image {
@@ -47,6 +48,7 @@ namespace retrace {
 
 
 extern trace::Parser parser;
+extern trace::Profiler profiler;
 
 
 /**
@@ -146,6 +148,9 @@ extern bool debug;
  * Add profiling data to the dump when retracing.
  */
 extern bool profiling;
+extern bool profilingCpuTimes;
+extern bool profilingGpuTimes;
+extern bool profilingPixelsDrawn;
 
 /**
  * State dumping.
@@ -156,6 +161,9 @@ extern bool dumpingState;
 extern bool doubleBuffer;
 extern bool coreProfile;
 
+extern unsigned frameNo;
+extern unsigned callNo;
+
 
 std::ostream &warning(trace::Call &call);
 
@@ -203,6 +211,24 @@ public:
 };
 
 
+class Dumper
+{
+public:
+    virtual image::Image *
+    getSnapshot(void) {
+        return NULL;
+    }
+
+    virtual bool
+    dumpState(std::ostream &os) {
+        return false;
+    }
+};
+
+
+extern Dumper *dumper;
+
+
 void
 setUp(void);
 
@@ -212,11 +238,7 @@ addCallbacks(retrace::Retracer &retracer);
 void
 frameComplete(trace::Call &call);
 
-image::Image *
-getSnapshot(void);
 
-bool
-dumpState(std::ostream &os);
 
 void
 flushRendering(void);