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