OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 SkSafeUnref(fOverdrawFilter); | 54 SkSafeUnref(fOverdrawFilter); |
55 SkSafeUnref(fTexOverrideFilter); | 55 SkSafeUnref(fTexOverrideFilter); |
56 } | 56 } |
57 | 57 |
58 void SkDebugCanvas::addDrawCommand(SkDrawCommand* command) { | 58 void SkDebugCanvas::addDrawCommand(SkDrawCommand* command) { |
59 command->setOffset(this->getOpID()); | 59 command->setOffset(this->getOpID()); |
60 fCommandVector.push(command); | 60 fCommandVector.push(command); |
61 } | 61 } |
62 | 62 |
63 void SkDebugCanvas::draw(SkCanvas* canvas) { | 63 void SkDebugCanvas::draw(SkCanvas* canvas) { |
| 64 fDrawNeedsReset = true; |
| 65 |
64 if (!fCommandVector.isEmpty()) { | 66 if (!fCommandVector.isEmpty()) { |
65 this->drawTo(canvas, fCommandVector.count() - 1); | 67 this->drawTo(canvas, fCommandVector.count() - 1); |
66 } | 68 } |
67 } | 69 } |
68 | 70 |
69 void SkDebugCanvas::applyUserTransform(SkCanvas* canvas) { | 71 void SkDebugCanvas::applyUserTransform(SkCanvas* canvas) { |
70 canvas->concat(fUserMatrix); | 72 canvas->concat(fUserMatrix); |
71 } | 73 } |
72 | 74 |
73 int SkDebugCanvas::getCommandAtPoint(int x, int y, int index) { | 75 int SkDebugCanvas::getCommandAtPoint(int x, int y, int index) { |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 } | 733 } |
732 | 734 |
733 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { | 735 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { |
734 if (fCalledAddStackData) { | 736 if (fCalledAddStackData) { |
735 fClipStackData.appendf("<br>"); | 737 fClipStackData.appendf("<br>"); |
736 addPathData(devPath, "pathOut"); | 738 addPathData(devPath, "pathOut"); |
737 return true; | 739 return true; |
738 } | 740 } |
739 return false; | 741 return false; |
740 } | 742 } |
OLD | NEW |