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