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

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

Issue 1153593003: Remove the SkCanvas comment API (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: rebased Created 5 years, 6 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/core/SkPicture.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 51
52 kBeginCommentGroup_Verb,
53 kAddComment_Verb,
54 kEndCommentGroup_Verb,
55
56 kCull_Verb 52 kCull_Verb
57 }; 53 };
58 54
59 /** 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
60 each drawing command. 56 each drawing command.
61 */ 57 */
62 class Dumper : public SkRefCnt { 58 class Dumper : public SkRefCnt {
63 public: 59 public:
64 SK_DECLARE_INST_COUNT(Dumper) 60 SK_DECLARE_INST_COUNT(Dumper)
65 61
66 virtual void dump(SkDumpCanvas*, SkDumpCanvas::Verb, const char str[], 62 virtual void dump(SkDumpCanvas*, SkDumpCanvas::Verb, const char str[],
67 const SkPaint*) = 0; 63 const SkPaint*) = 0;
68 64
69 private: 65 private:
70 typedef SkRefCnt INHERITED; 66 typedef SkRefCnt INHERITED;
71 }; 67 };
72 68
73 Dumper* getDumper() const { return fDumper; } 69 Dumper* getDumper() const { return fDumper; }
74 void setDumper(Dumper*); 70 void setDumper(Dumper*);
75 71
76 int getNestLevel() const { return fNestLevel; } 72 int getNestLevel() const { return fNestLevel; }
77 73
78 void beginCommentGroup(const char* description) override;
79 void addComment(const char* kywd, const char* value) override;
80 void endCommentGroup() override;
81
82 protected: 74 protected:
83 void willSave() override; 75 void willSave() override;
84 SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) ov erride; 76 SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) ov erride;
85 void willRestore() override; 77 void willRestore() override;
86 78
87 void didConcat(const SkMatrix&) override; 79 void didConcat(const SkMatrix&) override;
88 void didSetMatrix(const SkMatrix&) override; 80 void didSetMatrix(const SkMatrix&) override;
89 81
90 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override; 82 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) override;
91 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS calar y, 83 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS calar y,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 public: 158 public:
167 SkDebugfDumper(); 159 SkDebugfDumper();
168 160
169 private: 161 private:
170 typedef SkFormatDumper INHERITED; 162 typedef SkFormatDumper INHERITED;
171 }; 163 };
172 164
173 #endif 165 #endif
174 166
175 #endif 167 #endif
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | include/utils/SkNWayCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698