| 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 30 matching lines...) Expand all Loading... |
| 41 kDrawRect_Verb, | 41 kDrawRect_Verb, |
| 42 kDrawRRect_Verb, | 42 kDrawRRect_Verb, |
| 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 kDrawPatch_Verb, | 49 kDrawPatch_Verb, |
| 50 kDrawData_Verb, // obsolete | 50 kDrawData_Verb, // obsolete |
| 51 kDrawAnnotation_Verb, | |
| 52 | 51 |
| 53 kCull_Verb | 52 kCull_Verb |
| 54 }; | 53 }; |
| 55 | 54 |
| 56 /** Subclasses of this are installed on the DumpCanvas, and then called for | 55 /** Subclasses of this are installed on the DumpCanvas, and then called for |
| 57 each drawing command. | 56 each drawing command. |
| 58 */ | 57 */ |
| 59 class Dumper : public SkRefCnt { | 58 class Dumper : public SkRefCnt { |
| 60 public: | 59 public: |
| 61 | 60 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 const SkColor colors[], SkXfermode* xmode, | 113 const SkColor colors[], SkXfermode* xmode, |
| 115 const uint16_t indices[], int indexCount, | 114 const uint16_t indices[], int indexCount, |
| 116 const SkPaint&) override; | 115 const SkPaint&) override; |
| 117 | 116 |
| 118 void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; | 117 void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) override; |
| 119 void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; | 118 void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) override; |
| 120 void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; | 119 void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) override; |
| 121 void onClipRegion(const SkRegion&, SkRegion::Op) override; | 120 void onClipRegion(const SkRegion&, SkRegion::Op) override; |
| 122 | 121 |
| 123 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) overri
de; | 122 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) overri
de; |
| 124 void onDrawAnnotation(const SkRect&, const char key[], SkData* value) overri
de; | |
| 125 | 123 |
| 126 static const char* EdgeStyleToAAString(ClipEdgeStyle edgeStyle); | 124 static const char* EdgeStyleToAAString(ClipEdgeStyle edgeStyle); |
| 127 | 125 |
| 128 private: | 126 private: |
| 129 Dumper* fDumper; | 127 Dumper* fDumper; |
| 130 int fNestLevel; // for nesting recursive elements like pictures | 128 int fNestLevel; // for nesting recursive elements like pictures |
| 131 | 129 |
| 132 void dump(Verb, const SkPaint*, const char format[], ...); | 130 void dump(Verb, const SkPaint*, const char format[], ...); |
| 133 | 131 |
| 134 typedef SkCanvas INHERITED; | 132 typedef SkCanvas INHERITED; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 159 public: | 157 public: |
| 160 SkDebugfDumper(); | 158 SkDebugfDumper(); |
| 161 | 159 |
| 162 private: | 160 private: |
| 163 typedef SkFormatDumper INHERITED; | 161 typedef SkFormatDumper INHERITED; |
| 164 }; | 162 }; |
| 165 | 163 |
| 166 #endif | 164 #endif |
| 167 | 165 |
| 168 #endif | 166 #endif |
| OLD | NEW |