Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: tools/debugger/SkDebugCanvas.cpp

Issue 2127233002: Added the framework for having canvas/recorder/picture record depth_set's. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: updated tests to be more rigorous about translateZ in playback Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/debugger/SkDebugCanvas.h ('k') | tools/debugger/SkDrawCommand.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « tools/debugger/SkDebugCanvas.h ('k') | tools/debugger/SkDrawCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698