]> git.cworth.org Git - apitrace/commitdiff
trim: Don't consider a SwapBuffers call has having no side effects
authorCarl Worth <cworth@cworth.org>
Sat, 16 Feb 2013 01:15:53 +0000 (17:15 -0800)
committerCarl Worth <cworth@cworth.org>
Fri, 12 Apr 2013 20:25:13 +0000 (13:25 -0700)
I can't justify why I ever added this code. I can only guess that I was
trying to get qapitrace to not show frame markers for frames that had
largely been trimmed.

Anyway, the code is wrong. SwapBuffers call obviously have significant
side effects. And the effect I was trying to achieve is already well
satisified by the change in 2f0d1a3244c8953a4468759ac466b80c4965d38f
that will trim a SwapBuffers call when --trim-spec=drawing is in
force.

cli/trace_analyzer.cpp

index 730dab91b08d8478d001ed75d319938a2d55894d..803c81cde1b0c8f8d54725ff1a9120b61ea713dd 100644 (file)
@@ -271,12 +271,6 @@ TraceAnalyzer::callHasNoSideEffects(trace::Call *call, const char *name)
         return true;
     }
 
-    /* Similarly, swap-buffers calls don't have interesting side effects. */
-    if (call->flags & trace::CALL_FLAG_SWAP_RENDERTARGET &&
-        call->flags & trace::CALL_FLAG_END_FRAME) {
-        return true;
-    }
-
     /* Not known as a no-side-effect call. Return false for more analysis. */
     return false;
 }