diff options
-rw-r--r-- | tools/debugger/SkDebugCanvas.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/debugger/SkDebugCanvas.cpp b/tools/debugger/SkDebugCanvas.cpp index 123b9b4aa8..6b629c8959 100644 --- a/tools/debugger/SkDebugCanvas.cpp +++ b/tools/debugger/SkDebugCanvas.cpp @@ -239,6 +239,11 @@ void SkDebugCanvas::drawTo(SkCanvas* canvas, int index, int m) { } #if SK_SUPPORT_GPU + // We need to flush any pending operations, or they might batch with commands below. + // Previous operations were not registered with the audit trail when they were + // created, so if we allow them to combine, the audit trail will fail to find them. + canvas->flush(); + GrAuditTrail::AutoCollectBatches* acb = nullptr; if (at) { acb = new GrAuditTrail::AutoCollectBatches(at, i); |