Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: include/utils/SkDumpCanvas.h

Issue 1758023003: Move annotations to canvas virtual (patchset #8 id:140001 of https://codereview.chromium.org/174410… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: manual rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/private/SkRecords.h ('k') | include/utils/SkNWayCanvas.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « include/private/SkRecords.h ('k') | include/utils/SkNWayCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698