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 | 9 |
10 #ifndef SKDEBUGGER_H_ | 10 #ifndef SKDEBUGGER_H_ |
11 #define SKDEBUGGER_H_ | 11 #define SKDEBUGGER_H_ |
12 | 12 |
13 #include "SkDebugCanvas.h" | 13 #include "SkDebugCanvas.h" |
14 #include "SkPicture.h" | 14 #include "SkPicture.h" |
15 #include "SkTArray.h" | 15 #include "SkTArray.h" |
16 | 16 |
17 class SkString; | 17 class SkString; |
18 | 18 |
19 class SkDebugger { | 19 class SkDebugger { |
20 public: | 20 public: |
21 SkDebugger(); | 21 SkDebugger(); |
22 | 22 |
23 ~SkDebugger(); | 23 ~SkDebugger(); |
24 | 24 |
25 void setIndex(int index) { | 25 void setIndex(int index) { |
26 fIndex = index; | 26 fIndex = index; |
27 } | 27 } |
28 void draw(SkCanvas* canvas) { | 28 void draw(SkCanvas* canvas) { |
29 if (fIndex > 0) { | 29 if (fIndex >= 0) { |
30 fDebugCanvas->drawTo(canvas, fIndex); | 30 fDebugCanvas->drawTo(canvas, fIndex); |
31 } | 31 } |
32 } | 32 } |
33 | 33 |
34 void step(); | 34 void step(); |
35 void stepBack(); | 35 void stepBack(); |
36 void play(); | 36 void play(); |
37 void rewind(); | 37 void rewind(); |
38 | 38 |
39 bool isCommandVisible(int index) { | 39 bool isCommandVisible(int index) { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 126 |
127 private: | 127 private: |
128 SkDebugCanvas* fDebugCanvas; | 128 SkDebugCanvas* fDebugCanvas; |
129 SkPicture* fPicture; | 129 SkPicture* fPicture; |
130 | 130 |
131 int fIndex; | 131 int fIndex; |
132 }; | 132 }; |
133 | 133 |
134 | 134 |
135 #endif /* SKDEBUGGER_H_ */ | 135 #endif /* SKDEBUGGER_H_ */ |
OLD | NEW |