OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 #ifndef SkDumpCanvas_DEFINED | 8 #ifndef SkDumpCanvas_DEFINED |
9 #define SkDumpCanvas_DEFINED | 9 #define SkDumpCanvas_DEFINED |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 enum Verb { | 28 enum Verb { |
29 kNULL_Verb, | 29 kNULL_Verb, |
30 | 30 |
31 kSave_Verb, | 31 kSave_Verb, |
32 kRestore_Verb, | 32 kRestore_Verb, |
33 | 33 |
34 kMatrix_Verb, | 34 kMatrix_Verb, |
35 | 35 |
36 kClip_Verb, | 36 kClip_Verb, |
| 37 kCull_Verb, |
37 | 38 |
38 kDrawPaint_Verb, | 39 kDrawPaint_Verb, |
39 kDrawPoints_Verb, | 40 kDrawPoints_Verb, |
40 kDrawOval_Verb, | 41 kDrawOval_Verb, |
41 kDrawRect_Verb, | 42 kDrawRect_Verb, |
42 kDrawRRect_Verb, | 43 kDrawRRect_Verb, |
43 kDrawPath_Verb, | 44 kDrawPath_Verb, |
44 kDrawBitmap_Verb, | 45 kDrawBitmap_Verb, |
45 kDrawText_Verb, | 46 kDrawText_Verb, |
46 kDrawPicture_Verb, | 47 kDrawPicture_Verb, |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 virtual void drawVertices(VertexMode vmode, int vertexCount, | 120 virtual void drawVertices(VertexMode vmode, int vertexCount, |
120 const SkPoint vertices[], const SkPoint texs[], | 121 const SkPoint vertices[], const SkPoint texs[], |
121 const SkColor colors[], SkXfermode* xmode, | 122 const SkColor colors[], SkXfermode* xmode, |
122 const uint16_t indices[], int indexCount, | 123 const uint16_t indices[], int indexCount, |
123 const SkPaint& paint) SK_OVERRIDE; | 124 const SkPaint& paint) SK_OVERRIDE; |
124 virtual void drawData(const void*, size_t) SK_OVERRIDE; | 125 virtual void drawData(const void*, size_t) SK_OVERRIDE; |
125 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; | 126 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; |
126 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; | 127 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; |
127 virtual void endCommentGroup() SK_OVERRIDE; | 128 virtual void endCommentGroup() SK_OVERRIDE; |
128 | 129 |
| 130 protected: |
| 131 virtual void onPushCull(const SkRect& cullRect) SK_OVERRIDE; |
| 132 virtual void onPopCull() SK_OVERRIDE; |
| 133 |
129 private: | 134 private: |
130 Dumper* fDumper; | 135 Dumper* fDumper; |
131 int fNestLevel; // for nesting recursive elements like pictures | 136 int fNestLevel; // for nesting recursive elements like pictures |
132 | 137 |
133 void dump(Verb, const SkPaint*, const char format[], ...); | 138 void dump(Verb, const SkPaint*, const char format[], ...); |
134 | 139 |
135 typedef SkCanvas INHERITED; | 140 typedef SkCanvas INHERITED; |
136 }; | 141 }; |
137 | 142 |
138 /** Formats the draw commands, and send them to a function-pointer provided | 143 /** Formats the draw commands, and send them to a function-pointer provided |
(...skipping 21 matching lines...) Expand all Loading... |
160 public: | 165 public: |
161 SkDebugfDumper(); | 166 SkDebugfDumper(); |
162 | 167 |
163 private: | 168 private: |
164 typedef SkFormatDumper INHERITED; | 169 typedef SkFormatDumper INHERITED; |
165 }; | 170 }; |
166 | 171 |
167 #endif | 172 #endif |
168 | 173 |
169 #endif | 174 #endif |
OLD | NEW |