| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |