Index: tools/debugger/SkDebugCanvas.cpp |
diff --git a/tools/debugger/SkDebugCanvas.cpp b/tools/debugger/SkDebugCanvas.cpp |
index 123b9b4aa874279ae684f4e0e04ee0744467e84c..6b629c8959ffcb4ac70ed45e8a529fdaa897874b 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); |