Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: tools/debugger/SkDebugCanvas.cpp

Issue 1894633002: Fix skiaserve crash when displaying batch bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698