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

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

Issue 1253473002: Add drawImage{Rect,} support to SkDebugCanvas (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: win warnings Created 5 years, 5 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 | « no previous file | src/utils/debugger/SkDrawCommand.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 9
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 (SrcRectConstraint)constrai nt)); 420 (SrcRectConstraint)constrai nt));
421 } 421 }
422 422
423 void SkDebugCanvas::onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& cent er, 423 void SkDebugCanvas::onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& cent er,
424 const SkRect& dst, const SkPaint* paint) { 424 const SkRect& dst, const SkPaint* paint) {
425 this->addDrawCommand(new SkDrawBitmapNineCommand(bitmap, center, dst, paint) ); 425 this->addDrawCommand(new SkDrawBitmapNineCommand(bitmap, center, dst, paint) );
426 } 426 }
427 427
428 void SkDebugCanvas::onDrawImage(const SkImage* image, SkScalar left, SkScalar to p, 428 void SkDebugCanvas::onDrawImage(const SkImage* image, SkScalar left, SkScalar to p,
429 const SkPaint* paint) { 429 const SkPaint* paint) {
430 SkDebugf("SkDebugCanvas::onDrawImage unimplemented\n"); 430 this->addDrawCommand(new SkDrawImageCommand(image, left, top, paint));
431 } 431 }
432 432
433 void SkDebugCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, con st SkRect& dst, 433 void SkDebugCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, con st SkRect& dst,
434 const SkPaint* paint SRC_RECT_CONSTRAINT_PAR AM(constraint)) { 434 const SkPaint* paint SRC_RECT_CONSTRAINT_PAR AM(constraint)) {
435 SkDebugf("SkDebugCanvas::onDrawImageRect unimplemented\n"); 435 SRC_RECT_CONSTRAINT_LOCAL_DEFAULT(constraint);
436 this->addDrawCommand(new SkDrawImageRectCommand(image, src, dst, paint, cons traint));
436 } 437 }
437 438
438 void SkDebugCanvas::onDrawOval(const SkRect& oval, const SkPaint& paint) { 439 void SkDebugCanvas::onDrawOval(const SkRect& oval, const SkPaint& paint) {
439 this->addDrawCommand(new SkDrawOvalCommand(oval, paint)); 440 this->addDrawCommand(new SkDrawOvalCommand(oval, paint));
440 } 441 }
441 442
442 void SkDebugCanvas::onDrawPaint(const SkPaint& paint) { 443 void SkDebugCanvas::onDrawPaint(const SkPaint& paint) {
443 this->addDrawCommand(new SkDrawPaintCommand(paint)); 444 this->addDrawCommand(new SkDrawPaintCommand(paint));
444 } 445 }
445 446
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 } 665 }
665 666
666 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { 667 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) {
667 if (fCalledAddStackData) { 668 if (fCalledAddStackData) {
668 fClipStackData.appendf("<br>"); 669 fClipStackData.appendf("<br>");
669 addPathData(devPath, "pathOut"); 670 addPathData(devPath, "pathOut");
670 return true; 671 return true;
671 } 672 }
672 return false; 673 return false;
673 } 674 }
OLDNEW
« no previous file with comments | « no previous file | src/utils/debugger/SkDrawCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698