]> git.cworth.org Git - apitrace/commitdiff
Refactor more common retracing code.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Sat, 8 Oct 2011 16:16:18 +0000 (17:16 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sat, 8 Oct 2011 17:15:41 +0000 (18:15 +0100)
glretrace_main.cpp
retrace.cpp

index 80660d777cc0f46ec2167a7458af85c0ac8f9509..cf250b9e572373d982205f91f762dccfdc68dca0 100644 (file)
@@ -205,11 +205,6 @@ static void display(void) {
     Trace::Call *call;
 
     while ((call = parser.parse_call())) {
-        if (retrace::verbosity >= 1) {
-            std::cout << *call;
-            std::cout.flush();
-        }
-
         retracer.retrace(*call);
 
         if (!insideGlBeginEnd &&
index 62d900a53571b136131b120a6657aaac6cf985b6..b04c997b6eb90d5cba51b1c688b4d33abf2705d7 100644 (file)
@@ -61,6 +61,11 @@ void Retracer::addCallbacks(const Entry *entries) {
 
 
 void Retracer::retrace(Trace::Call &call) {
+    if (verbosity >= 1) {
+        std::cout << call;
+        std::cout.flush();
+    }
+
     Callback callback = 0;
 
     Trace::Id id = call.sig->id;