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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 private: | 69 private: |
70 typedef SkRefCnt INHERITED; | 70 typedef SkRefCnt INHERITED; |
71 }; | 71 }; |
72 | 72 |
73 Dumper* getDumper() const { return fDumper; } | 73 Dumper* getDumper() const { return fDumper; } |
74 void setDumper(Dumper*); | 74 void setDumper(Dumper*); |
75 | 75 |
76 int getNestLevel() const { return fNestLevel; } | 76 int getNestLevel() const { return fNestLevel; } |
77 | 77 |
78 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; | 78 void beginCommentGroup(const char* description) SK_OVERRIDE; |
79 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; | 79 void addComment(const char* kywd, const char* value) SK_OVERRIDE; |
80 virtual void endCommentGroup() SK_OVERRIDE; | 80 void endCommentGroup() SK_OVERRIDE; |
81 | 81 |
82 protected: | 82 protected: |
83 virtual void willSave() SK_OVERRIDE; | 83 void willSave() SK_OVERRIDE; |
84 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF
lags) SK_OVERRIDE; | 84 SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveFlags) SK
_OVERRIDE; |
85 virtual void willRestore() SK_OVERRIDE; | 85 void willRestore() SK_OVERRIDE; |
86 | 86 |
87 virtual void didConcat(const SkMatrix&) SK_OVERRIDE; | 87 void didConcat(const SkMatrix&) SK_OVERRIDE; |
88 virtual void didSetMatrix(const SkMatrix&) SK_OVERRIDE; | 88 void didSetMatrix(const SkMatrix&) SK_OVERRIDE; |
89 | 89 |
90 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK
_OVERRIDE; | 90 void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK_OVERRID
E; |
91 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS
calar y, | 91 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, SkS
calar y, |
92 const SkPaint&) SK_OVERRIDE; | 92 const SkPaint&) SK_OVERRIDE; |
93 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin
t pos[], | 93 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin
t pos[], |
94 const SkPaint&) SK_OVERRIDE; | 94 const SkPaint&) SK_OVERRIDE; |
95 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca
lar xpos[], | 95 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca
lar xpos[], |
96 SkScalar constY, const SkPaint&) SK_OVERRIDE; | 96 SkScalar constY, const SkPaint&) SK_OVERRIDE; |
97 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, | 97 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP
ath& path, |
98 const SkMatrix* matrix, const SkPaint&) SK_OVE
RRIDE; | 98 const SkMatrix* matrix, const SkPaint&) SK_OVE
RRIDE; |
99 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, | 99 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, |
100 const SkPaint& paint) SK_OVERRIDE; | 100 const SkPaint& paint) SK_OVERRIDE; |
(...skipping 15 matching lines...) Expand all Loading... |
116 const SkPaint*) SK_OVERRIDE; | 116 const SkPaint*) SK_OVERRIDE; |
117 void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect&
dst, | 117 void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect&
dst, |
118 const SkPaint*) SK_OVERRIDE; | 118 const SkPaint*) SK_OVERRIDE; |
119 void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVE
RRIDE; | 119 void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVE
RRIDE; |
120 void onDrawVertices(VertexMode vmode, int vertexCount, | 120 void onDrawVertices(VertexMode vmode, int vertexCount, |
121 const SkPoint vertices[], const SkPoint texs[], | 121 const SkPoint vertices[], const SkPoint texs[], |
122 const SkColor colors[], SkXfermode* xmode, | 122 const SkColor colors[], SkXfermode* xmode, |
123 const uint16_t indices[], int indexCount, | 123 const uint16_t indices[], int indexCount, |
124 const SkPaint&) SK_OVERRIDE; | 124 const SkPaint&) SK_OVERRIDE; |
125 | 125 |
126 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 126 void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; |
127 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE
RRIDE; | 127 void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; |
128 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR
IDE; | 128 void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERRIDE; |
129 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; | 129 void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE; |
130 | 130 |
131 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*
) SK_OVERRIDE; | 131 void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint*) SK_OVE
RRIDE; |
132 | 132 |
133 static const char* EdgeStyleToAAString(ClipEdgeStyle edgeStyle); | 133 static const char* EdgeStyleToAAString(ClipEdgeStyle edgeStyle); |
134 | 134 |
135 private: | 135 private: |
136 Dumper* fDumper; | 136 Dumper* fDumper; |
137 int fNestLevel; // for nesting recursive elements like pictures | 137 int fNestLevel; // for nesting recursive elements like pictures |
138 | 138 |
139 void dump(Verb, const SkPaint*, const char format[], ...); | 139 void dump(Verb, const SkPaint*, const char format[], ...); |
140 | 140 |
141 typedef SkCanvas INHERITED; | 141 typedef SkCanvas INHERITED; |
(...skipping 24 matching lines...) Expand all Loading... |
166 public: | 166 public: |
167 SkDebugfDumper(); | 167 SkDebugfDumper(); |
168 | 168 |
169 private: | 169 private: |
170 typedef SkFormatDumper INHERITED; | 170 typedef SkFormatDumper INHERITED; |
171 }; | 171 }; |
172 | 172 |
173 #endif | 173 #endif |
174 | 174 |
175 #endif | 175 #endif |
OLD | NEW |