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

Side by Side Diff: src/utils/debugger/SkDrawCommand.h

Issue 660883002: "Fix" debugger's setMatrix handling (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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 | « src/utils/debugger/SkDebugCanvas.cpp ('k') | src/utils/debugger/SkDrawCommand.cpp » ('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 /* 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 #ifndef SKDRAWCOMMAND_H_ 9 #ifndef SKDRAWCOMMAND_H_
10 #define SKDRAWCOMMAND_H_ 10 #define SKDRAWCOMMAND_H_
(...skipping 23 matching lines...) Expand all
34 return fVisible; 34 return fVisible;
35 } 35 }
36 36
37 void setVisible(bool toggle) { 37 void setVisible(bool toggle) {
38 fVisible = toggle; 38 fVisible = toggle;
39 } 39 }
40 40
41 SkTDArray<SkString*>* Info() {return &fInfo; }; 41 SkTDArray<SkString*>* Info() {return &fInfo; };
42 virtual void execute(SkCanvas* canvas) = 0; 42 virtual void execute(SkCanvas* canvas) = 0;
43 virtual void vizExecute(SkCanvas* canvas) { }; 43 virtual void vizExecute(SkCanvas* canvas) { };
44
45 virtual void setUserMatrix(const SkMatrix& userMtx) { };
46
44 /** Does nothing by default, but used by save() and restore()-type 47 /** Does nothing by default, but used by save() and restore()-type
45 subclasses to track unresolved save() calls. */ 48 subclasses to track unresolved save() calls. */
46 virtual void trackSaveState(int* state) { }; 49 virtual void trackSaveState(int* state) { };
47 50
48 // The next "active" system is only used by save, saveLayer, restore, 51 // The next "active" system is only used by save, saveLayer, restore,
49 // pushCull and popCull. It is used in two ways: 52 // pushCull and popCull. It is used in two ways:
50 // To determine which saveLayers are currently active (at a 53 // To determine which saveLayers are currently active (at a
51 // given point in the rendering). 54 // given point in the rendering).
52 // saves just return a kPushLayer action but don't track active state 55 // saves just return a kPushLayer action but don't track active state
53 // restores just return a kPopLayer action 56 // restores just return a kPopLayer action
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 private: 588 private:
586 SkScalar fSx; 589 SkScalar fSx;
587 SkScalar fSy; 590 SkScalar fSy;
588 591
589 typedef SkDrawCommand INHERITED; 592 typedef SkDrawCommand INHERITED;
590 }; 593 };
591 594
592 class SkSetMatrixCommand : public SkDrawCommand { 595 class SkSetMatrixCommand : public SkDrawCommand {
593 public: 596 public:
594 SkSetMatrixCommand(const SkMatrix& matrix); 597 SkSetMatrixCommand(const SkMatrix& matrix);
598 virtual void setUserMatrix(const SkMatrix&) SK_OVERRIDE;
595 virtual void execute(SkCanvas* canvas) SK_OVERRIDE; 599 virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
596 private: 600 private:
601 SkMatrix fUserMatrix;
597 SkMatrix fMatrix; 602 SkMatrix fMatrix;
598 603
599 typedef SkDrawCommand INHERITED; 604 typedef SkDrawCommand INHERITED;
600 }; 605 };
601 606
602 class SkSkewCommand : public SkDrawCommand { 607 class SkSkewCommand : public SkDrawCommand {
603 public: 608 public:
604 SkSkewCommand(SkScalar sx, SkScalar sy); 609 SkSkewCommand(SkScalar sx, SkScalar sy);
605 virtual void execute(SkCanvas* canvas) SK_OVERRIDE; 610 virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
606 private: 611 private:
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 class SkPopCullCommand : public SkDrawCommand { 648 class SkPopCullCommand : public SkDrawCommand {
644 public: 649 public:
645 SkPopCullCommand(); 650 SkPopCullCommand();
646 virtual void execute(SkCanvas* canvas) SK_OVERRIDE; 651 virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
647 virtual Action action() const { return kPopCull_Action; } 652 virtual Action action() const { return kPopCull_Action; }
648 private: 653 private:
649 typedef SkDrawCommand INHERITED; 654 typedef SkDrawCommand INHERITED;
650 }; 655 };
651 656
652 #endif 657 #endif
OLDNEW
« no previous file with comments | « src/utils/debugger/SkDebugCanvas.cpp ('k') | src/utils/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698