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.
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;
}