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 |
688 void SkDebugCanvas::toggleCommand(int index, bool toggle) { | 693 void SkDebugCanvas::toggleCommand(int index, bool toggle) { |
689 SkASSERT(index < fCommandVector.count()); | 694 SkASSERT(index < fCommandVector.count()); |
690 fCommandVector[index]->setVisible(toggle); | 695 fCommandVector[index]->setVisible(toggle); |
691 } | 696 } |
692 | 697 |
693 static const char* gFillTypeStrs[] = { | 698 static const char* gFillTypeStrs[] = { |
694 "kWinding_FillType", | 699 "kWinding_FillType", |
695 "kEvenOdd_FillType", | 700 "kEvenOdd_FillType", |
696 "kInverseWinding_FillType", | 701 "kInverseWinding_FillType", |
697 "kInverseEvenOdd_FillType" | 702 "kInverseEvenOdd_FillType" |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 } | 812 } |
808 | 813 |
809 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { | 814 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { |
810 if (fCalledAddStackData) { | 815 if (fCalledAddStackData) { |
811 fClipStackData.appendf("<br>"); | 816 fClipStackData.appendf("<br>"); |
812 addPathData(devPath, "pathOut"); | 817 addPathData(devPath, "pathOut"); |
813 return true; | 818 return true; |
814 } | 819 } |
815 return false; | 820 return false; |
816 } | 821 } |
OLD | NEW |