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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 this->INHERITED::onClipRect(large, SkRegion::kReplace_Op, kHard_ClipEdgeStyl
e); | 44 this->INHERITED::onClipRect(large, SkRegion::kReplace_Op, kHard_ClipEdgeStyl
e); |
45 } | 45 } |
46 | 46 |
47 SkDebugCanvas::~SkDebugCanvas() { | 47 SkDebugCanvas::~SkDebugCanvas() { |
48 fCommandVector.deleteAll(); | 48 fCommandVector.deleteAll(); |
49 SkSafeUnref(fOverdrawFilter); | 49 SkSafeUnref(fOverdrawFilter); |
50 SkSafeUnref(fTexOverrideFilter); | 50 SkSafeUnref(fTexOverrideFilter); |
51 } | 51 } |
52 | 52 |
53 void SkDebugCanvas::addDrawCommand(SkDrawCommand* command) { | 53 void SkDebugCanvas::addDrawCommand(SkDrawCommand* command) { |
54 command->setOffset(this->getOpID()); | |
55 fCommandVector.push(command); | 54 fCommandVector.push(command); |
56 } | 55 } |
57 | 56 |
58 void SkDebugCanvas::draw(SkCanvas* canvas) { | 57 void SkDebugCanvas::draw(SkCanvas* canvas) { |
59 if (!fCommandVector.isEmpty()) { | 58 if (!fCommandVector.isEmpty()) { |
60 this->drawTo(canvas, fCommandVector.count() - 1); | 59 this->drawTo(canvas, fCommandVector.count() - 1); |
61 } | 60 } |
62 } | 61 } |
63 | 62 |
64 void SkDebugCanvas::applyUserTransform(SkCanvas* canvas) { | 63 void SkDebugCanvas::applyUserTransform(SkCanvas* canvas) { |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 } | 672 } |
674 | 673 |
675 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { | 674 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { |
676 if (fCalledAddStackData) { | 675 if (fCalledAddStackData) { |
677 fClipStackData.appendf("<br>"); | 676 fClipStackData.appendf("<br>"); |
678 addPathData(devPath, "pathOut"); | 677 addPathData(devPath, "pathOut"); |
679 return true; | 678 return true; |
680 } | 679 } |
681 return false; | 680 return false; |
682 } | 681 } |
OLD | NEW |