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 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 (void)this->INHERITED::getSaveLayerStrategy(rec); | 678 (void)this->INHERITED::getSaveLayerStrategy(rec); |
679 // No need for a full layer. | 679 // No need for a full layer. |
680 return kNoLayer_SaveLayerStrategy; | 680 return kNoLayer_SaveLayerStrategy; |
681 } | 681 } |
682 | 682 |
683 void SkDebugCanvas::didSetMatrix(const SkMatrix& matrix) { | 683 void SkDebugCanvas::didSetMatrix(const SkMatrix& matrix) { |
684 this->addDrawCommand(new SkSetMatrixCommand(matrix)); | 684 this->addDrawCommand(new SkSetMatrixCommand(matrix)); |
685 this->INHERITED::didSetMatrix(matrix); | 685 this->INHERITED::didSetMatrix(matrix); |
686 } | 686 } |
687 | 687 |
688 void SkDebugCanvas::didTranslateZ(SkScalar z) { | |
689 this->addDrawCommand(new SkTranslateZCommand(z)); | |
690 this->INHERITED::didTranslateZ(z); | |
691 } | |
692 | |
693 void SkDebugCanvas::toggleCommand(int index, bool toggle) { | 688 void SkDebugCanvas::toggleCommand(int index, bool toggle) { |
694 SkASSERT(index < fCommandVector.count()); | 689 SkASSERT(index < fCommandVector.count()); |
695 fCommandVector[index]->setVisible(toggle); | 690 fCommandVector[index]->setVisible(toggle); |
696 } | 691 } |
697 | 692 |
698 static const char* gFillTypeStrs[] = { | 693 static const char* gFillTypeStrs[] = { |
699 "kWinding_FillType", | 694 "kWinding_FillType", |
700 "kEvenOdd_FillType", | 695 "kEvenOdd_FillType", |
701 "kInverseWinding_FillType", | 696 "kInverseWinding_FillType", |
702 "kInverseEvenOdd_FillType" | 697 "kInverseEvenOdd_FillType" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 } | 807 } |
813 | 808 |
814 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { | 809 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { |
815 if (fCalledAddStackData) { | 810 if (fCalledAddStackData) { |
816 fClipStackData.appendf("<br>"); | 811 fClipStackData.appendf("<br>"); |
817 addPathData(devPath, "pathOut"); | 812 addPathData(devPath, "pathOut"); |
818 return true; | 813 return true; |
819 } | 814 } |
820 return false; | 815 return false; |
821 } | 816 } |
OLD | NEW |