| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 kDrawDRRect_Verb, | 43 kDrawDRRect_Verb, |
| 44 kDrawPath_Verb, | 44 kDrawPath_Verb, |
| 45 kDrawBitmap_Verb, | 45 kDrawBitmap_Verb, |
| 46 kDrawText_Verb, | 46 kDrawText_Verb, |
| 47 kDrawPicture_Verb, | 47 kDrawPicture_Verb, |
| 48 kDrawVertices_Verb, | 48 kDrawVertices_Verb, |
| 49 kDrawData_Verb, | 49 kDrawData_Verb, |
| 50 | 50 |
| 51 kBeginCommentGroup_Verb, | 51 kBeginCommentGroup_Verb, |
| 52 kAddComment_Verb, | 52 kAddComment_Verb, |
| 53 kEndCommentGroup_Verb | 53 kEndCommentGroup_Verb, |
| 54 |
| 55 kCull_Verb |
| 54 }; | 56 }; |
| 55 | 57 |
| 56 /** Subclasses of this are installed on the DumpCanvas, and then called for | 58 /** Subclasses of this are installed on the DumpCanvas, and then called for |
| 57 each drawing command. | 59 each drawing command. |
| 58 */ | 60 */ |
| 59 class Dumper : public SkRefCnt { | 61 class Dumper : public SkRefCnt { |
| 60 public: | 62 public: |
| 61 SK_DECLARE_INST_COUNT(Dumper) | 63 SK_DECLARE_INST_COUNT(Dumper) |
| 62 | 64 |
| 63 virtual void dump(SkDumpCanvas*, SkDumpCanvas::Verb, const char str[], | 65 virtual void dump(SkDumpCanvas*, SkDumpCanvas::Verb, const char str[], |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 const SkColor colors[], SkXfermode* xmode, | 124 const SkColor colors[], SkXfermode* xmode, |
| 123 const uint16_t indices[], int indexCount, | 125 const uint16_t indices[], int indexCount, |
| 124 const SkPaint& paint) SK_OVERRIDE; | 126 const SkPaint& paint) SK_OVERRIDE; |
| 125 virtual void drawData(const void*, size_t) SK_OVERRIDE; | 127 virtual void drawData(const void*, size_t) SK_OVERRIDE; |
| 126 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; | 128 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; |
| 127 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; | 129 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; |
| 128 virtual void endCommentGroup() SK_OVERRIDE; | 130 virtual void endCommentGroup() SK_OVERRIDE; |
| 129 | 131 |
| 130 protected: | 132 protected: |
| 131 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; | 133 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; |
| 134 virtual void onPushCull(const SkRect& cullRect) SK_OVERRIDE; |
| 135 virtual void onPopCull() SK_OVERRIDE; |
| 132 | 136 |
| 133 private: | 137 private: |
| 134 Dumper* fDumper; | 138 Dumper* fDumper; |
| 135 int fNestLevel; // for nesting recursive elements like pictures | 139 int fNestLevel; // for nesting recursive elements like pictures |
| 136 | 140 |
| 137 void dump(Verb, const SkPaint*, const char format[], ...); | 141 void dump(Verb, const SkPaint*, const char format[], ...); |
| 138 | 142 |
| 139 typedef SkCanvas INHERITED; | 143 typedef SkCanvas INHERITED; |
| 140 }; | 144 }; |
| 141 | 145 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 164 public: | 168 public: |
| 165 SkDebugfDumper(); | 169 SkDebugfDumper(); |
| 166 | 170 |
| 167 private: | 171 private: |
| 168 typedef SkFormatDumper INHERITED; | 172 typedef SkFormatDumper INHERITED; |
| 169 }; | 173 }; |
| 170 | 174 |
| 171 #endif | 175 #endif |
| 172 | 176 |
| 173 #endif | 177 #endif |
| OLD | NEW |