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

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

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web Created 5 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 | « src/utils/debugger/SkDebugCanvas.cpp ('k') | src/utils/win/SkDWriteFontFileStream.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 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 #ifndef SKDRAWCOMMAND_H_ 9 #ifndef SKDRAWCOMMAND_H_
10 #define SKDRAWCOMMAND_H_ 10 #define SKDRAWCOMMAND_H_
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 private: 107 private:
108 OpType fOpType; 108 OpType fOpType;
109 size_t fOffset; 109 size_t fOffset;
110 bool fVisible; 110 bool fVisible;
111 }; 111 };
112 112
113 class SkRestoreCommand : public SkDrawCommand { 113 class SkRestoreCommand : public SkDrawCommand {
114 public: 114 public:
115 SkRestoreCommand(); 115 SkRestoreCommand();
116 void execute(SkCanvas* canvas) const SK_OVERRIDE; 116 void execute(SkCanvas* canvas) const override;
117 Action action() const SK_OVERRIDE { return kPopLayer_Action; } 117 Action action() const override { return kPopLayer_Action; }
118 118
119 private: 119 private:
120 typedef SkDrawCommand INHERITED; 120 typedef SkDrawCommand INHERITED;
121 }; 121 };
122 122
123 class SkClearCommand : public SkDrawCommand { 123 class SkClearCommand : public SkDrawCommand {
124 public: 124 public:
125 SkClearCommand(SkColor color); 125 SkClearCommand(SkColor color);
126 void execute(SkCanvas* canvas) const SK_OVERRIDE; 126 void execute(SkCanvas* canvas) const override;
127 private: 127 private:
128 SkColor fColor; 128 SkColor fColor;
129 129
130 typedef SkDrawCommand INHERITED; 130 typedef SkDrawCommand INHERITED;
131 }; 131 };
132 132
133 class SkClipPathCommand : public SkDrawCommand { 133 class SkClipPathCommand : public SkDrawCommand {
134 public: 134 public:
135 SkClipPathCommand(const SkPath& path, SkRegion::Op op, bool doAA); 135 SkClipPathCommand(const SkPath& path, SkRegion::Op op, bool doAA);
136 void execute(SkCanvas* canvas) const SK_OVERRIDE; 136 void execute(SkCanvas* canvas) const override;
137 bool render(SkCanvas* canvas) const SK_OVERRIDE; 137 bool render(SkCanvas* canvas) const override;
138 private: 138 private:
139 SkPath fPath; 139 SkPath fPath;
140 SkRegion::Op fOp; 140 SkRegion::Op fOp;
141 bool fDoAA; 141 bool fDoAA;
142 142
143 typedef SkDrawCommand INHERITED; 143 typedef SkDrawCommand INHERITED;
144 }; 144 };
145 145
146 class SkClipRegionCommand : public SkDrawCommand { 146 class SkClipRegionCommand : public SkDrawCommand {
147 public: 147 public:
148 SkClipRegionCommand(const SkRegion& region, SkRegion::Op op); 148 SkClipRegionCommand(const SkRegion& region, SkRegion::Op op);
149 void execute(SkCanvas* canvas) const SK_OVERRIDE; 149 void execute(SkCanvas* canvas) const override;
150 private: 150 private:
151 SkRegion fRegion; 151 SkRegion fRegion;
152 SkRegion::Op fOp; 152 SkRegion::Op fOp;
153 153
154 typedef SkDrawCommand INHERITED; 154 typedef SkDrawCommand INHERITED;
155 }; 155 };
156 156
157 class SkClipRectCommand : public SkDrawCommand { 157 class SkClipRectCommand : public SkDrawCommand {
158 public: 158 public:
159 SkClipRectCommand(const SkRect& rect, SkRegion::Op op, bool doAA); 159 SkClipRectCommand(const SkRect& rect, SkRegion::Op op, bool doAA);
160 void execute(SkCanvas* canvas) const SK_OVERRIDE; 160 void execute(SkCanvas* canvas) const override;
161 161
162 const SkRect& rect() const { return fRect; } 162 const SkRect& rect() const { return fRect; }
163 SkRegion::Op op() const { return fOp; } 163 SkRegion::Op op() const { return fOp; }
164 bool doAA() const { return fDoAA; } 164 bool doAA() const { return fDoAA; }
165 165
166 private: 166 private:
167 SkRect fRect; 167 SkRect fRect;
168 SkRegion::Op fOp; 168 SkRegion::Op fOp;
169 bool fDoAA; 169 bool fDoAA;
170 170
171 typedef SkDrawCommand INHERITED; 171 typedef SkDrawCommand INHERITED;
172 }; 172 };
173 173
174 class SkClipRRectCommand : public SkDrawCommand { 174 class SkClipRRectCommand : public SkDrawCommand {
175 public: 175 public:
176 SkClipRRectCommand(const SkRRect& rrect, SkRegion::Op op, bool doAA); 176 SkClipRRectCommand(const SkRRect& rrect, SkRegion::Op op, bool doAA);
177 void execute(SkCanvas* canvas) const SK_OVERRIDE; 177 void execute(SkCanvas* canvas) const override;
178 bool render(SkCanvas* canvas) const SK_OVERRIDE; 178 bool render(SkCanvas* canvas) const override;
179 179
180 const SkRRect& rrect() const { return fRRect; } 180 const SkRRect& rrect() const { return fRRect; }
181 SkRegion::Op op() const { return fOp; } 181 SkRegion::Op op() const { return fOp; }
182 bool doAA() const { return fDoAA; } 182 bool doAA() const { return fDoAA; }
183 183
184 private: 184 private:
185 SkRRect fRRect; 185 SkRRect fRRect;
186 SkRegion::Op fOp; 186 SkRegion::Op fOp;
187 bool fDoAA; 187 bool fDoAA;
188 188
189 typedef SkDrawCommand INHERITED; 189 typedef SkDrawCommand INHERITED;
190 }; 190 };
191 191
192 class SkConcatCommand : public SkDrawCommand { 192 class SkConcatCommand : public SkDrawCommand {
193 public: 193 public:
194 SkConcatCommand(const SkMatrix& matrix); 194 SkConcatCommand(const SkMatrix& matrix);
195 void execute(SkCanvas* canvas) const SK_OVERRIDE; 195 void execute(SkCanvas* canvas) const override;
196 private: 196 private:
197 SkMatrix fMatrix; 197 SkMatrix fMatrix;
198 198
199 typedef SkDrawCommand INHERITED; 199 typedef SkDrawCommand INHERITED;
200 }; 200 };
201 201
202 class SkDrawBitmapCommand : public SkDrawCommand { 202 class SkDrawBitmapCommand : public SkDrawCommand {
203 public: 203 public:
204 SkDrawBitmapCommand(const SkBitmap& bitmap, SkScalar left, SkScalar top, 204 SkDrawBitmapCommand(const SkBitmap& bitmap, SkScalar left, SkScalar top,
205 const SkPaint* paint); 205 const SkPaint* paint);
206 void execute(SkCanvas* canvas) const SK_OVERRIDE; 206 void execute(SkCanvas* canvas) const override;
207 bool render(SkCanvas* canvas) const SK_OVERRIDE; 207 bool render(SkCanvas* canvas) const override;
208 private: 208 private:
209 SkBitmap fBitmap; 209 SkBitmap fBitmap;
210 SkScalar fLeft; 210 SkScalar fLeft;
211 SkScalar fTop; 211 SkScalar fTop;
212 SkPaint fPaint; 212 SkPaint fPaint;
213 SkPaint* fPaintPtr; 213 SkPaint* fPaintPtr;
214 214
215 typedef SkDrawCommand INHERITED; 215 typedef SkDrawCommand INHERITED;
216 }; 216 };
217 217
218 class SkDrawBitmapNineCommand : public SkDrawCommand { 218 class SkDrawBitmapNineCommand : public SkDrawCommand {
219 public: 219 public:
220 SkDrawBitmapNineCommand(const SkBitmap& bitmap, const SkIRect& center, 220 SkDrawBitmapNineCommand(const SkBitmap& bitmap, const SkIRect& center,
221 const SkRect& dst, const SkPaint* paint); 221 const SkRect& dst, const SkPaint* paint);
222 void execute(SkCanvas* canvas) const SK_OVERRIDE; 222 void execute(SkCanvas* canvas) const override;
223 bool render(SkCanvas* canvas) const SK_OVERRIDE; 223 bool render(SkCanvas* canvas) const override;
224 private: 224 private:
225 SkBitmap fBitmap; 225 SkBitmap fBitmap;
226 SkIRect fCenter; 226 SkIRect fCenter;
227 SkRect fDst; 227 SkRect fDst;
228 SkPaint fPaint; 228 SkPaint fPaint;
229 SkPaint* fPaintPtr; 229 SkPaint* fPaintPtr;
230 230
231 typedef SkDrawCommand INHERITED; 231 typedef SkDrawCommand INHERITED;
232 }; 232 };
233 233
234 class SkDrawBitmapRectCommand : public SkDrawCommand { 234 class SkDrawBitmapRectCommand : public SkDrawCommand {
235 public: 235 public:
236 SkDrawBitmapRectCommand(const SkBitmap& bitmap, const SkRect* src, 236 SkDrawBitmapRectCommand(const SkBitmap& bitmap, const SkRect* src,
237 const SkRect& dst, const SkPaint* paint, 237 const SkRect& dst, const SkPaint* paint,
238 SkCanvas::DrawBitmapRectFlags flags); 238 SkCanvas::DrawBitmapRectFlags flags);
239 void execute(SkCanvas* canvas) const SK_OVERRIDE; 239 void execute(SkCanvas* canvas) const override;
240 bool render(SkCanvas* canvas) const SK_OVERRIDE; 240 bool render(SkCanvas* canvas) const override;
241 241
242 const SkBitmap& bitmap() const { return fBitmap; } 242 const SkBitmap& bitmap() const { return fBitmap; }
243 243
244 // The non-const 'paint' method allows modification of this object's 244 // The non-const 'paint' method allows modification of this object's
245 // SkPaint. For this reason the ctor and setPaint method make a local copy. 245 // SkPaint. For this reason the ctor and setPaint method make a local copy.
246 // The 'fPaintPtr' member acts a signal that the local SkPaint is valid 246 // The 'fPaintPtr' member acts a signal that the local SkPaint is valid
247 // (since only an SkPaint* is passed into the ctor). 247 // (since only an SkPaint* is passed into the ctor).
248 const SkPaint* paint() const { return fPaintPtr; } 248 const SkPaint* paint() const { return fPaintPtr; }
249 SkPaint* paint() { return fPaintPtr; } 249 SkPaint* paint() { return fPaintPtr; }
250 250
(...skipping 15 matching lines...) Expand all
266 SkPaint fPaint; 266 SkPaint fPaint;
267 SkPaint* fPaintPtr; 267 SkPaint* fPaintPtr;
268 SkCanvas::DrawBitmapRectFlags fFlags; 268 SkCanvas::DrawBitmapRectFlags fFlags;
269 269
270 typedef SkDrawCommand INHERITED; 270 typedef SkDrawCommand INHERITED;
271 }; 271 };
272 272
273 class SkBeginCommentGroupCommand : public SkDrawCommand { 273 class SkBeginCommentGroupCommand : public SkDrawCommand {
274 public: 274 public:
275 SkBeginCommentGroupCommand(const char* description); 275 SkBeginCommentGroupCommand(const char* description);
276 void execute(SkCanvas* canvas) const SK_OVERRIDE { 276 void execute(SkCanvas* canvas) const override {
277 canvas->beginCommentGroup(fDescription.c_str()); 277 canvas->beginCommentGroup(fDescription.c_str());
278 }; 278 };
279 private: 279 private:
280 SkString fDescription; 280 SkString fDescription;
281 281
282 typedef SkDrawCommand INHERITED; 282 typedef SkDrawCommand INHERITED;
283 }; 283 };
284 284
285 class SkCommentCommand : public SkDrawCommand { 285 class SkCommentCommand : public SkDrawCommand {
286 public: 286 public:
287 SkCommentCommand(const char* kywd, const char* value); 287 SkCommentCommand(const char* kywd, const char* value);
288 void execute(SkCanvas* canvas) const SK_OVERRIDE { 288 void execute(SkCanvas* canvas) const override {
289 canvas->addComment(fKywd.c_str(), fValue.c_str()); 289 canvas->addComment(fKywd.c_str(), fValue.c_str());
290 }; 290 };
291 private: 291 private:
292 SkString fKywd; 292 SkString fKywd;
293 SkString fValue; 293 SkString fValue;
294 294
295 typedef SkDrawCommand INHERITED; 295 typedef SkDrawCommand INHERITED;
296 }; 296 };
297 297
298 class SkEndCommentGroupCommand : public SkDrawCommand { 298 class SkEndCommentGroupCommand : public SkDrawCommand {
299 public: 299 public:
300 SkEndCommentGroupCommand(); 300 SkEndCommentGroupCommand();
301 void execute(SkCanvas* canvas) const SK_OVERRIDE { 301 void execute(SkCanvas* canvas) const override {
302 canvas->endCommentGroup(); 302 canvas->endCommentGroup();
303 }; 303 };
304 private: 304 private:
305 typedef SkDrawCommand INHERITED; 305 typedef SkDrawCommand INHERITED;
306 }; 306 };
307 307
308 class SkDrawOvalCommand : public SkDrawCommand { 308 class SkDrawOvalCommand : public SkDrawCommand {
309 public: 309 public:
310 SkDrawOvalCommand(const SkRect& oval, const SkPaint& paint); 310 SkDrawOvalCommand(const SkRect& oval, const SkPaint& paint);
311 void execute(SkCanvas* canvas) const SK_OVERRIDE; 311 void execute(SkCanvas* canvas) const override;
312 bool render(SkCanvas* canvas) const SK_OVERRIDE; 312 bool render(SkCanvas* canvas) const override;
313 private: 313 private:
314 SkRect fOval; 314 SkRect fOval;
315 SkPaint fPaint; 315 SkPaint fPaint;
316 316
317 typedef SkDrawCommand INHERITED; 317 typedef SkDrawCommand INHERITED;
318 }; 318 };
319 319
320 class SkDrawPaintCommand : public SkDrawCommand { 320 class SkDrawPaintCommand : public SkDrawCommand {
321 public: 321 public:
322 SkDrawPaintCommand(const SkPaint& paint); 322 SkDrawPaintCommand(const SkPaint& paint);
323 void execute(SkCanvas* canvas) const SK_OVERRIDE; 323 void execute(SkCanvas* canvas) const override;
324 bool render(SkCanvas* canvas) const SK_OVERRIDE; 324 bool render(SkCanvas* canvas) const override;
325 private: 325 private:
326 SkPaint fPaint; 326 SkPaint fPaint;
327 327
328 typedef SkDrawCommand INHERITED; 328 typedef SkDrawCommand INHERITED;
329 }; 329 };
330 330
331 class SkDrawPathCommand : public SkDrawCommand { 331 class SkDrawPathCommand : public SkDrawCommand {
332 public: 332 public:
333 SkDrawPathCommand(const SkPath& path, const SkPaint& paint); 333 SkDrawPathCommand(const SkPath& path, const SkPaint& paint);
334 void execute(SkCanvas* canvas) const SK_OVERRIDE; 334 void execute(SkCanvas* canvas) const override;
335 bool render(SkCanvas* canvas) const SK_OVERRIDE; 335 bool render(SkCanvas* canvas) const override;
336 336
337 private: 337 private:
338 SkPath fPath; 338 SkPath fPath;
339 SkPaint fPaint; 339 SkPaint fPaint;
340 340
341 typedef SkDrawCommand INHERITED; 341 typedef SkDrawCommand INHERITED;
342 }; 342 };
343 343
344 class SkDrawPictureCommand : public SkDrawCommand { 344 class SkDrawPictureCommand : public SkDrawCommand {
345 public: 345 public:
346 SkDrawPictureCommand(const SkPicture* picture, const SkMatrix* matrix, const SkPaint* paint); 346 SkDrawPictureCommand(const SkPicture* picture, const SkMatrix* matrix, const SkPaint* paint);
347 void execute(SkCanvas* canvas) const SK_OVERRIDE; 347 void execute(SkCanvas* canvas) const override;
348 bool render(SkCanvas* canvas) const SK_OVERRIDE; 348 bool render(SkCanvas* canvas) const override;
349 349
350 private: 350 private:
351 SkAutoTUnref<const SkPicture> fPicture; 351 SkAutoTUnref<const SkPicture> fPicture;
352 SkMatrix fMatrix; 352 SkMatrix fMatrix;
353 SkMatrix* fMatrixPtr; 353 SkMatrix* fMatrixPtr;
354 SkPaint fPaint; 354 SkPaint fPaint;
355 SkPaint* fPaintPtr; 355 SkPaint* fPaintPtr;
356 356
357 typedef SkDrawCommand INHERITED; 357 typedef SkDrawCommand INHERITED;
358 }; 358 };
359 359
360 class SkDrawPointsCommand : public SkDrawCommand { 360 class SkDrawPointsCommand : public SkDrawCommand {
361 public: 361 public:
362 SkDrawPointsCommand(SkCanvas::PointMode mode, size_t count, const SkPoint pt s[], 362 SkDrawPointsCommand(SkCanvas::PointMode mode, size_t count, const SkPoint pt s[],
363 const SkPaint& paint); 363 const SkPaint& paint);
364 virtual ~SkDrawPointsCommand() { delete [] fPts; } 364 virtual ~SkDrawPointsCommand() { delete [] fPts; }
365 void execute(SkCanvas* canvas) const SK_OVERRIDE; 365 void execute(SkCanvas* canvas) const override;
366 bool render(SkCanvas* canvas) const SK_OVERRIDE; 366 bool render(SkCanvas* canvas) const override;
367 private: 367 private:
368 SkCanvas::PointMode fMode; 368 SkCanvas::PointMode fMode;
369 size_t fCount; 369 size_t fCount;
370 SkPoint* fPts; 370 SkPoint* fPts;
371 SkPaint fPaint; 371 SkPaint fPaint;
372 372
373 typedef SkDrawCommand INHERITED; 373 typedef SkDrawCommand INHERITED;
374 }; 374 };
375 375
376 class SkDrawTextCommand : public SkDrawCommand { 376 class SkDrawTextCommand : public SkDrawCommand {
377 public: 377 public:
378 SkDrawTextCommand(const void* text, size_t byteLength, SkScalar x, SkScalar y, 378 SkDrawTextCommand(const void* text, size_t byteLength, SkScalar x, SkScalar y,
379 const SkPaint& paint); 379 const SkPaint& paint);
380 virtual ~SkDrawTextCommand() { delete [] fText; } 380 virtual ~SkDrawTextCommand() { delete [] fText; }
381 void execute(SkCanvas* canvas) const SK_OVERRIDE; 381 void execute(SkCanvas* canvas) const override;
382 private: 382 private:
383 char* fText; 383 char* fText;
384 size_t fByteLength; 384 size_t fByteLength;
385 SkScalar fX; 385 SkScalar fX;
386 SkScalar fY; 386 SkScalar fY;
387 SkPaint fPaint; 387 SkPaint fPaint;
388 388
389 typedef SkDrawCommand INHERITED; 389 typedef SkDrawCommand INHERITED;
390 }; 390 };
391 391
392 class SkDrawPosTextCommand : public SkDrawCommand { 392 class SkDrawPosTextCommand : public SkDrawCommand {
393 public: 393 public:
394 SkDrawPosTextCommand(const void* text, size_t byteLength, const SkPoint pos[ ], 394 SkDrawPosTextCommand(const void* text, size_t byteLength, const SkPoint pos[ ],
395 const SkPaint& paint); 395 const SkPaint& paint);
396 virtual ~SkDrawPosTextCommand() { delete [] fPos; delete [] fText; } 396 virtual ~SkDrawPosTextCommand() { delete [] fPos; delete [] fText; }
397 void execute(SkCanvas* canvas) const SK_OVERRIDE; 397 void execute(SkCanvas* canvas) const override;
398 private: 398 private:
399 char* fText; 399 char* fText;
400 size_t fByteLength; 400 size_t fByteLength;
401 SkPoint* fPos; 401 SkPoint* fPos;
402 SkPaint fPaint; 402 SkPaint fPaint;
403 403
404 typedef SkDrawCommand INHERITED; 404 typedef SkDrawCommand INHERITED;
405 }; 405 };
406 406
407 class SkDrawTextOnPathCommand : public SkDrawCommand { 407 class SkDrawTextOnPathCommand : public SkDrawCommand {
408 public: 408 public:
409 SkDrawTextOnPathCommand(const void* text, size_t byteLength, const SkPath& p ath, 409 SkDrawTextOnPathCommand(const void* text, size_t byteLength, const SkPath& p ath,
410 const SkMatrix* matrix, const SkPaint& paint); 410 const SkMatrix* matrix, const SkPaint& paint);
411 virtual ~SkDrawTextOnPathCommand() { delete [] fText; } 411 virtual ~SkDrawTextOnPathCommand() { delete [] fText; }
412 void execute(SkCanvas* canvas) const SK_OVERRIDE; 412 void execute(SkCanvas* canvas) const override;
413 private: 413 private:
414 char* fText; 414 char* fText;
415 size_t fByteLength; 415 size_t fByteLength;
416 SkPath fPath; 416 SkPath fPath;
417 SkMatrix fMatrix; 417 SkMatrix fMatrix;
418 SkPaint fPaint; 418 SkPaint fPaint;
419 419
420 typedef SkDrawCommand INHERITED; 420 typedef SkDrawCommand INHERITED;
421 }; 421 };
422 422
423 class SkDrawPosTextHCommand : public SkDrawCommand { 423 class SkDrawPosTextHCommand : public SkDrawCommand {
424 public: 424 public:
425 SkDrawPosTextHCommand(const void* text, size_t byteLength, const SkScalar xp os[], 425 SkDrawPosTextHCommand(const void* text, size_t byteLength, const SkScalar xp os[],
426 SkScalar constY, const SkPaint& paint); 426 SkScalar constY, const SkPaint& paint);
427 virtual ~SkDrawPosTextHCommand() { delete [] fXpos; delete [] fText; } 427 virtual ~SkDrawPosTextHCommand() { delete [] fXpos; delete [] fText; }
428 void execute(SkCanvas* canvas) const SK_OVERRIDE; 428 void execute(SkCanvas* canvas) const override;
429 private: 429 private:
430 SkScalar* fXpos; 430 SkScalar* fXpos;
431 char* fText; 431 char* fText;
432 size_t fByteLength; 432 size_t fByteLength;
433 SkScalar fConstY; 433 SkScalar fConstY;
434 SkPaint fPaint; 434 SkPaint fPaint;
435 435
436 typedef SkDrawCommand INHERITED; 436 typedef SkDrawCommand INHERITED;
437 }; 437 };
438 438
439 class SkDrawTextBlobCommand : public SkDrawCommand { 439 class SkDrawTextBlobCommand : public SkDrawCommand {
440 public: 440 public:
441 SkDrawTextBlobCommand(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPaint& paint); 441 SkDrawTextBlobCommand(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPaint& paint);
442 442
443 void execute(SkCanvas* canvas) const SK_OVERRIDE; 443 void execute(SkCanvas* canvas) const override;
444 bool render(SkCanvas* canvas) const SK_OVERRIDE; 444 bool render(SkCanvas* canvas) const override;
445 445
446 private: 446 private:
447 SkAutoTUnref<const SkTextBlob> fBlob; 447 SkAutoTUnref<const SkTextBlob> fBlob;
448 SkScalar fXPos; 448 SkScalar fXPos;
449 SkScalar fYPos; 449 SkScalar fYPos;
450 SkPaint fPaint; 450 SkPaint fPaint;
451 451
452 typedef SkDrawCommand INHERITED; 452 typedef SkDrawCommand INHERITED;
453 }; 453 };
454 454
455 class SkDrawPatchCommand : public SkDrawCommand { 455 class SkDrawPatchCommand : public SkDrawCommand {
456 public: 456 public:
457 SkDrawPatchCommand(const SkPoint cubics[12], const SkColor colors[4], 457 SkDrawPatchCommand(const SkPoint cubics[12], const SkColor colors[4],
458 const SkPoint texCoords[4], SkXfermode* xmode, 458 const SkPoint texCoords[4], SkXfermode* xmode,
459 const SkPaint& paint); 459 const SkPaint& paint);
460 void execute(SkCanvas* canvas) const SK_OVERRIDE; 460 void execute(SkCanvas* canvas) const override;
461 461
462 private: 462 private:
463 SkPoint fCubics[12]; 463 SkPoint fCubics[12];
464 SkColor fColors[4]; 464 SkColor fColors[4];
465 SkPoint fTexCoords[4]; 465 SkPoint fTexCoords[4];
466 SkAutoTUnref<SkXfermode> fXfermode; 466 SkAutoTUnref<SkXfermode> fXfermode;
467 SkPaint fPaint; 467 SkPaint fPaint;
468 468
469 typedef SkDrawCommand INHERITED; 469 typedef SkDrawCommand INHERITED;
470 }; 470 };
471 471
472 472
473 class SkDrawRectCommand : public SkDrawCommand { 473 class SkDrawRectCommand : public SkDrawCommand {
474 public: 474 public:
475 SkDrawRectCommand(const SkRect& rect, const SkPaint& paint); 475 SkDrawRectCommand(const SkRect& rect, const SkPaint& paint);
476 void execute(SkCanvas* canvas) const SK_OVERRIDE; 476 void execute(SkCanvas* canvas) const override;
477 477
478 const SkRect& rect() const { return fRect; } 478 const SkRect& rect() const { return fRect; }
479 const SkPaint& paint() const { return fPaint; } 479 const SkPaint& paint() const { return fPaint; }
480 private: 480 private:
481 SkRect fRect; 481 SkRect fRect;
482 SkPaint fPaint; 482 SkPaint fPaint;
483 483
484 typedef SkDrawCommand INHERITED; 484 typedef SkDrawCommand INHERITED;
485 }; 485 };
486 486
487 class SkDrawRRectCommand : public SkDrawCommand { 487 class SkDrawRRectCommand : public SkDrawCommand {
488 public: 488 public:
489 SkDrawRRectCommand(const SkRRect& rrect, const SkPaint& paint); 489 SkDrawRRectCommand(const SkRRect& rrect, const SkPaint& paint);
490 void execute(SkCanvas* canvas) const SK_OVERRIDE; 490 void execute(SkCanvas* canvas) const override;
491 bool render(SkCanvas* canvas) const SK_OVERRIDE; 491 bool render(SkCanvas* canvas) const override;
492 private: 492 private:
493 SkRRect fRRect; 493 SkRRect fRRect;
494 SkPaint fPaint; 494 SkPaint fPaint;
495 495
496 typedef SkDrawCommand INHERITED; 496 typedef SkDrawCommand INHERITED;
497 }; 497 };
498 498
499 class SkDrawDRRectCommand : public SkDrawCommand { 499 class SkDrawDRRectCommand : public SkDrawCommand {
500 public: 500 public:
501 SkDrawDRRectCommand(const SkRRect& outer, const SkRRect& inner, 501 SkDrawDRRectCommand(const SkRRect& outer, const SkRRect& inner,
502 const SkPaint& paint); 502 const SkPaint& paint);
503 void execute(SkCanvas* canvas) const SK_OVERRIDE; 503 void execute(SkCanvas* canvas) const override;
504 bool render(SkCanvas* canvas) const SK_OVERRIDE; 504 bool render(SkCanvas* canvas) const override;
505 private: 505 private:
506 SkRRect fOuter; 506 SkRRect fOuter;
507 SkRRect fInner; 507 SkRRect fInner;
508 SkPaint fPaint; 508 SkPaint fPaint;
509 509
510 typedef SkDrawCommand INHERITED; 510 typedef SkDrawCommand INHERITED;
511 }; 511 };
512 512
513 class SkDrawSpriteCommand : public SkDrawCommand { 513 class SkDrawSpriteCommand : public SkDrawCommand {
514 public: 514 public:
515 SkDrawSpriteCommand(const SkBitmap& bitmap, int left, int top, const SkPaint * paint); 515 SkDrawSpriteCommand(const SkBitmap& bitmap, int left, int top, const SkPaint * paint);
516 void execute(SkCanvas* canvas) const SK_OVERRIDE; 516 void execute(SkCanvas* canvas) const override;
517 bool render(SkCanvas* canvas) const SK_OVERRIDE; 517 bool render(SkCanvas* canvas) const override;
518 private: 518 private:
519 SkBitmap fBitmap; 519 SkBitmap fBitmap;
520 int fLeft; 520 int fLeft;
521 int fTop; 521 int fTop;
522 SkPaint fPaint; 522 SkPaint fPaint;
523 SkPaint* fPaintPtr; 523 SkPaint* fPaintPtr;
524 524
525 typedef SkDrawCommand INHERITED; 525 typedef SkDrawCommand INHERITED;
526 }; 526 };
527 527
528 class SkDrawVerticesCommand : public SkDrawCommand { 528 class SkDrawVerticesCommand : public SkDrawCommand {
529 public: 529 public:
530 SkDrawVerticesCommand(SkCanvas::VertexMode vmode, int vertexCount, 530 SkDrawVerticesCommand(SkCanvas::VertexMode vmode, int vertexCount,
531 const SkPoint vertices[], const SkPoint texs[], 531 const SkPoint vertices[], const SkPoint texs[],
532 const SkColor colors[], SkXfermode* xfermode, 532 const SkColor colors[], SkXfermode* xfermode,
533 const uint16_t indices[], int indexCount, 533 const uint16_t indices[], int indexCount,
534 const SkPaint& paint); 534 const SkPaint& paint);
535 virtual ~SkDrawVerticesCommand(); 535 virtual ~SkDrawVerticesCommand();
536 void execute(SkCanvas* canvas) const SK_OVERRIDE; 536 void execute(SkCanvas* canvas) const override;
537 private: 537 private:
538 SkCanvas::VertexMode fVmode; 538 SkCanvas::VertexMode fVmode;
539 int fVertexCount; 539 int fVertexCount;
540 SkPoint* fVertices; 540 SkPoint* fVertices;
541 SkPoint* fTexs; 541 SkPoint* fTexs;
542 SkColor* fColors; 542 SkColor* fColors;
543 SkXfermode* fXfermode; 543 SkXfermode* fXfermode;
544 uint16_t* fIndices; 544 uint16_t* fIndices;
545 int fIndexCount; 545 int fIndexCount;
546 SkPaint fPaint; 546 SkPaint fPaint;
547 547
548 typedef SkDrawCommand INHERITED; 548 typedef SkDrawCommand INHERITED;
549 }; 549 };
550 550
551 class SkSaveCommand : public SkDrawCommand { 551 class SkSaveCommand : public SkDrawCommand {
552 public: 552 public:
553 SkSaveCommand(); 553 SkSaveCommand();
554 void execute(SkCanvas* canvas) const SK_OVERRIDE; 554 void execute(SkCanvas* canvas) const override;
555 Action action() const SK_OVERRIDE { return kPushLayer_Action; } 555 Action action() const override { return kPushLayer_Action; }
556 private: 556 private:
557 typedef SkDrawCommand INHERITED; 557 typedef SkDrawCommand INHERITED;
558 }; 558 };
559 559
560 class SkSaveLayerCommand : public SkDrawCommand { 560 class SkSaveLayerCommand : public SkDrawCommand {
561 public: 561 public:
562 SkSaveLayerCommand(const SkRect* bounds, const SkPaint* paint, 562 SkSaveLayerCommand(const SkRect* bounds, const SkPaint* paint,
563 SkCanvas::SaveFlags flags); 563 SkCanvas::SaveFlags flags);
564 void execute(SkCanvas* canvas) const SK_OVERRIDE; 564 void execute(SkCanvas* canvas) const override;
565 void vizExecute(SkCanvas* canvas) const SK_OVERRIDE; 565 void vizExecute(SkCanvas* canvas) const override;
566 Action action() const SK_OVERRIDE{ return kPushLayer_Action; } 566 Action action() const override{ return kPushLayer_Action; }
567 void setActive(bool active) SK_OVERRIDE { fActive = active; } 567 void setActive(bool active) override { fActive = active; }
568 bool active() const SK_OVERRIDE { return fActive; } 568 bool active() const override { return fActive; }
569 569
570 const SkPaint* paint() const { return fPaintPtr; } 570 const SkPaint* paint() const { return fPaintPtr; }
571 571
572 private: 572 private:
573 SkRect fBounds; 573 SkRect fBounds;
574 SkPaint fPaint; 574 SkPaint fPaint;
575 SkPaint* fPaintPtr; 575 SkPaint* fPaintPtr;
576 SkCanvas::SaveFlags fFlags; 576 SkCanvas::SaveFlags fFlags;
577 577
578 bool fActive; 578 bool fActive;
579 579
580 typedef SkDrawCommand INHERITED; 580 typedef SkDrawCommand INHERITED;
581 }; 581 };
582 582
583 class SkSetMatrixCommand : public SkDrawCommand { 583 class SkSetMatrixCommand : public SkDrawCommand {
584 public: 584 public:
585 SkSetMatrixCommand(const SkMatrix& matrix); 585 SkSetMatrixCommand(const SkMatrix& matrix);
586 void setUserMatrix(const SkMatrix&) SK_OVERRIDE; 586 void setUserMatrix(const SkMatrix&) override;
587 void execute(SkCanvas* canvas) const SK_OVERRIDE; 587 void execute(SkCanvas* canvas) const override;
588 private: 588 private:
589 SkMatrix fUserMatrix; 589 SkMatrix fUserMatrix;
590 SkMatrix fMatrix; 590 SkMatrix fMatrix;
591 591
592 typedef SkDrawCommand INHERITED; 592 typedef SkDrawCommand INHERITED;
593 }; 593 };
594 594
595 #endif 595 #endif
OLDNEW
« no previous file with comments | « src/utils/debugger/SkDebugCanvas.cpp ('k') | src/utils/win/SkDWriteFontFileStream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698