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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkCanvasPriv.h" 8 #include "SkCanvasPriv.h"
9 #include "SkClipStack.h" 9 #include "SkClipStack.h"
10 #include "SkDebugCanvas.h" 10 #include "SkDebugCanvas.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 at = this->getAuditTrail(canvas); 232 at = this->getAuditTrail(canvas);
233 } 233 }
234 #endif 234 #endif
235 235
236 for (int i = 0; i <= index; i++) { 236 for (int i = 0; i <= index; i++) {
237 if (i == index && fFilter) { 237 if (i == index && fFilter) {
238 canvas->clear(0xAAFFFFFF); 238 canvas->clear(0xAAFFFFFF);
239 } 239 }
240 240
241 #if SK_SUPPORT_GPU 241 #if SK_SUPPORT_GPU
242 // We need to flush any pending operations, or they might batch with com mands below.
243 // Previous operations were not registered with the audit trail when the y were
244 // created, so if we allow them to combine, the audit trail will fail to find them.
245 canvas->flush();
246
242 GrAuditTrail::AutoCollectBatches* acb = nullptr; 247 GrAuditTrail::AutoCollectBatches* acb = nullptr;
243 if (at) { 248 if (at) {
244 acb = new GrAuditTrail::AutoCollectBatches(at, i); 249 acb = new GrAuditTrail::AutoCollectBatches(at, i);
245 } 250 }
246 #endif 251 #endif
247 252
248 if (fCommandVector[i]->isVisible()) { 253 if (fCommandVector[i]->isVisible()) {
249 if (fMegaVizMode && fCommandVector[i]->active()) { 254 if (fMegaVizMode && fCommandVector[i]->active()) {
250 // "active" commands execute their visualization behaviors: 255 // "active" commands execute their visualization behaviors:
251 // All active saveLayers get replaced with saves so all draw s go to the 256 // All active saveLayers get replaced with saves so all draw s go to the
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 } 807 }
803 808
804 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { 809 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) {
805 if (fCalledAddStackData) { 810 if (fCalledAddStackData) {
806 fClipStackData.appendf("<br>"); 811 fClipStackData.appendf("<br>");
807 addPathData(devPath, "pathOut"); 812 addPathData(devPath, "pathOut");
808 return true; 813 return true;
809 } 814 }
810 return false; 815 return false;
811 } 816 }
OLDNEW
« 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