diff options
author | Carl Worth <cworth@cworth.org> | 2012-11-16 12:41:52 -0800 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2013-02-06 15:46:20 +0000 |
commit | 2f0d1a3244c8953a4468759ac466b80c4965d38f (patch) | |
tree | f04404023b6f0c80bd5d86b50793971f43ab4cbe /cli | |
parent | 25fe524415ade86b96e5d260134fab7de587b227 (diff) |
trim: Trim swapbuffers calls when --trim-spec=drawing
Previously, the SwapBuffers calls were only getting trimmed if
--trim-spec included "no-side-effects". It was counter-intuitive that
a trim-spec of "drawing" alone would leave all the SwapBuffers calls
in place. So catch them under this trim-spec as well.
Diffstat (limited to 'cli')
-rw-r--r-- | cli/trace_analyzer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cli/trace_analyzer.cpp b/cli/trace_analyzer.cpp index 48153f02..730dab91 100644 --- a/cli/trace_analyzer.cpp +++ b/cli/trace_analyzer.cpp @@ -635,6 +635,13 @@ TraceAnalyzer::recordDrawingSideEffects(trace::Call *call, const char *name) return true; } + /* Though it's not flagged as a "RENDER" operation, we also want + * to trim swapbuffers calls when trimming drawing operations. */ + if (call->flags & trace::CALL_FLAG_SWAP_RENDERTARGET && + call->flags & trace::CALL_FLAG_END_FRAME) { + return true; + } + /* No known drawing-related side effects. Return false for more analysis. */ return false; } |