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

Side by Side Diff: src/utils/debugger/SkDebugCanvas.h

Issue 831253002: Revert of Revert of move remaining virtual draw methods to onDraw (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | « src/utils/SkProxyCanvas.cpp ('k') | src/utils/debugger/SkDebugCanvas.cpp » ('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 2012 Google Inc. 3 * Copyright 2012 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 8
9 9
10 #ifndef SKDEBUGCANVAS_H_ 10 #ifndef SKDEBUGCANVAS_H_
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 fUserMatrix = matrix; 141 fUserMatrix = matrix;
142 fDrawNeedsReset = true; 142 fDrawNeedsReset = true;
143 } 143 }
144 144
145 SkString clipStackData() const { return fClipStackData; } 145 SkString clipStackData() const { return fClipStackData; }
146 146
147 //////////////////////////////////////////////////////////////////////////////// 147 ////////////////////////////////////////////////////////////////////////////////
148 // Inherited from SkCanvas 148 // Inherited from SkCanvas
149 //////////////////////////////////////////////////////////////////////////////// 149 ////////////////////////////////////////////////////////////////////////////////
150 150
151 virtual void drawBitmap(const SkBitmap&, SkScalar left, SkScalar top,
152 const SkPaint*) SK_OVERRIDE;
153
154 virtual void drawBitmapRectToRect(const SkBitmap&, const SkRect* src,
155 const SkRect& dst, const SkPaint* paint,
156 DrawBitmapRectFlags flags) SK_OVERRIDE;
157
158 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center,
159 const SkRect& dst, const SkPaint*) SK_OVERRIDE;
160
161 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; 151 virtual void beginCommentGroup(const char* description) SK_OVERRIDE;
162
163 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; 152 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE;
164
165 virtual void endCommentGroup() SK_OVERRIDE; 153 virtual void endCommentGroup() SK_OVERRIDE;
166 154
167 virtual void drawOval(const SkRect& oval, const SkPaint&) SK_OVERRIDE;
168
169 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
170
171 virtual void drawPath(const SkPath& path, const SkPaint&) SK_OVERRIDE;
172
173 virtual void drawPoints(PointMode, size_t count, const SkPoint pts[],
174 const SkPaint&) SK_OVERRIDE;
175
176 virtual void drawRect(const SkRect& rect, const SkPaint&) SK_OVERRIDE;
177
178 virtual void drawRRect(const SkRRect& rrect, const SkPaint& paint) SK_OVERRI DE;
179
180 virtual void drawSprite(const SkBitmap&, int left, int top,
181 const SkPaint*) SK_OVERRIDE;
182
183 virtual void drawVertices(VertexMode, int vertexCount,
184 const SkPoint vertices[], const SkPoint texs[],
185 const SkColor colors[], SkXfermode*,
186 const uint16_t indices[], int indexCount,
187 const SkPaint&) SK_OVERRIDE;
188
189 static const int kVizImageHeight = 256; 155 static const int kVizImageHeight = 256;
190 static const int kVizImageWidth = 256; 156 static const int kVizImageWidth = 256;
191 157
192 virtual bool isClipEmpty() const SK_OVERRIDE { return false; } 158 virtual bool isClipEmpty() const SK_OVERRIDE { return false; }
193 virtual bool isClipRect() const SK_OVERRIDE { return true; } 159 virtual bool isClipRect() const SK_OVERRIDE { return true; }
194 virtual bool getClipBounds(SkRect* bounds) const SK_OVERRIDE { 160 virtual bool getClipBounds(SkRect* bounds) const SK_OVERRIDE {
195 if (bounds) { 161 if (bounds) {
196 bounds->setXYWH(0, 0, 162 bounds->setXYWH(0, 0,
197 SkIntToScalar(this->imageInfo().width()), 163 SkIntToScalar(this->imageInfo().width()),
198 SkIntToScalar(this->imageInfo().height())); 164 SkIntToScalar(this->imageInfo().height()));
(...skipping 20 matching lines...) Expand all
219 const SkPaint&) SK_OVERRIDE; 185 const SkPaint&) SK_OVERRIDE;
220 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin t pos[], 186 virtual void onDrawPosText(const void* text, size_t byteLength, const SkPoin t pos[],
221 const SkPaint&) SK_OVERRIDE; 187 const SkPaint&) SK_OVERRIDE;
222 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca lar xpos[], 188 virtual void onDrawPosTextH(const void* text, size_t byteLength, const SkSca lar xpos[],
223 SkScalar constY, const SkPaint&) SK_OVERRIDE; 189 SkScalar constY, const SkPaint&) SK_OVERRIDE;
224 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path, 190 virtual void onDrawTextOnPath(const void* text, size_t byteLength, const SkP ath& path,
225 const SkMatrix* matrix, const SkPaint&) SK_OVE RRIDE; 191 const SkMatrix* matrix, const SkPaint&) SK_OVE RRIDE;
226 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, 192 virtual void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
227 const SkPaint& paint) SK_OVERRIDE; 193 const SkPaint& paint) SK_OVERRIDE;
228 194
195 void onDrawPaint(const SkPaint&) SK_OVERRIDE;
196 void onDrawPoints(PointMode, size_t count, const SkPoint pts[], const SkPain t&) SK_OVERRIDE;
197 void onDrawRect(const SkRect&, const SkPaint&) SK_OVERRIDE;
198 void onDrawOval(const SkRect&, const SkPaint&) SK_OVERRIDE;
199 void onDrawRRect(const SkRRect&, const SkPaint&) SK_OVERRIDE;
200 void onDrawPath(const SkPath&, const SkPaint&) SK_OVERRIDE;
201 void onDrawBitmap(const SkBitmap&, SkScalar left, SkScalar top, const SkPain t*) SK_OVERRIDE;
202 void onDrawBitmapRect(const SkBitmap&, const SkRect* src, const SkRect& dst, const SkPaint*,
203 DrawBitmapRectFlags flags) SK_OVERRIDE;
204 void onDrawImage(const SkImage*, SkScalar left, SkScalar top, const SkPaint* ) SK_OVERRIDE;
205 void onDrawImageRect(const SkImage*, const SkRect* src, const SkRect& dst,
206 const SkPaint*) SK_OVERRIDE;
207 void onDrawBitmapNine(const SkBitmap&, const SkIRect& center, const SkRect& dst,
208 const SkPaint*) SK_OVERRIDE;
209 void onDrawSprite(const SkBitmap&, int left, int top, const SkPaint*) SK_OVE RRIDE;
210 void onDrawVertices(VertexMode vmode, int vertexCount,
211 const SkPoint vertices[], const SkPoint texs[],
212 const SkColor colors[], SkXfermode* xmode,
213 const uint16_t indices[], int indexCount,
214 const SkPaint&) SK_OVERRIDE;
215
229 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 216 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
230 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE; 217 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE;
231 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE; 218 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
232 virtual void onClipRegion(const SkRegion& region, SkRegion::Op) SK_OVERRIDE; 219 virtual void onClipRegion(const SkRegion& region, SkRegion::Op) SK_OVERRIDE;
233 220
234 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint* ) SK_OVERRIDE; 221 virtual void onDrawPicture(const SkPicture*, const SkMatrix*, const SkPaint* ) SK_OVERRIDE;
235 222
236 void markActiveCommands(int index); 223 void markActiveCommands(int index);
237 224
238 private: 225 private:
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 bool lastClipStackData(const SkPath& devPath); 286 bool lastClipStackData(const SkPath& devPath);
300 void outputConicPoints(const SkPoint* pts, SkScalar weight); 287 void outputConicPoints(const SkPoint* pts, SkScalar weight);
301 void outputPoints(const SkPoint* pts, int count); 288 void outputPoints(const SkPoint* pts, int count);
302 void outputPointsCommon(const SkPoint* pts, int count); 289 void outputPointsCommon(const SkPoint* pts, int count);
303 void outputScalar(SkScalar num); 290 void outputScalar(SkScalar num);
304 291
305 typedef SkCanvas INHERITED; 292 typedef SkCanvas INHERITED;
306 }; 293 };
307 294
308 #endif 295 #endif
OLDNEW
« no previous file with comments | « src/utils/SkProxyCanvas.cpp ('k') | src/utils/debugger/SkDebugCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698