OLD | NEW |
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 103 |
104 protected: | 104 protected: |
105 SkTDArray<SkString*> fInfo; | 105 SkTDArray<SkString*> fInfo; |
106 | 106 |
107 private: | 107 private: |
108 OpType fOpType; | 108 OpType fOpType; |
109 size_t fOffset; | 109 size_t fOffset; |
110 bool fVisible; | 110 bool fVisible; |
111 }; | 111 }; |
112 | 112 |
| 113 // TODO: switch Chromium over to not using these |
113 typedef SkDrawCommand::OpType DrawType; | 114 typedef SkDrawCommand::OpType DrawType; |
114 | 115 |
| 116 #define SAVE SkDrawCommand::kSave_OpType |
| 117 #define SCALE SkDrawCommand::kSetMatrix_OpType |
| 118 #define TRANSLATE SkDrawCommand::kSetMatrix_OpType |
| 119 #define DRAW_RECT SkDrawCommand::kDrawRect_OpType |
| 120 #define RESTORE SkDrawCommand::kRestore_OpType |
| 121 #define CLIP_RECT SkDrawCommand::kClipRect_OpType |
| 122 |
115 class SkRestoreCommand : public SkDrawCommand { | 123 class SkRestoreCommand : public SkDrawCommand { |
116 public: | 124 public: |
117 SkRestoreCommand(); | 125 SkRestoreCommand(); |
118 void execute(SkCanvas* canvas) const SK_OVERRIDE; | 126 void execute(SkCanvas* canvas) const SK_OVERRIDE; |
119 Action action() const SK_OVERRIDE { return kPopLayer_Action; } | 127 Action action() const SK_OVERRIDE { return kPopLayer_Action; } |
120 | 128 |
121 private: | 129 private: |
122 typedef SkDrawCommand INHERITED; | 130 typedef SkDrawCommand INHERITED; |
123 }; | 131 }; |
124 | 132 |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 void setUserMatrix(const SkMatrix&) SK_OVERRIDE; | 596 void setUserMatrix(const SkMatrix&) SK_OVERRIDE; |
589 void execute(SkCanvas* canvas) const SK_OVERRIDE; | 597 void execute(SkCanvas* canvas) const SK_OVERRIDE; |
590 private: | 598 private: |
591 SkMatrix fUserMatrix; | 599 SkMatrix fUserMatrix; |
592 SkMatrix fMatrix; | 600 SkMatrix fMatrix; |
593 | 601 |
594 typedef SkDrawCommand INHERITED; | 602 typedef SkDrawCommand INHERITED; |
595 }; | 603 }; |
596 | 604 |
597 #endif | 605 #endif |
OLD | NEW |