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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/utils/debugger/SkDrawCommand.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/debugger/SkDebugCanvas.cpp
diff --git a/src/utils/debugger/SkDebugCanvas.cpp b/src/utils/debugger/SkDebugCanvas.cpp
index 00923db40588590df3b00d049ebc5d27b223b507..1d798787fa4621aaadb8c8f7007e381618b39d99 100644
--- a/src/utils/debugger/SkDebugCanvas.cpp
+++ b/src/utils/debugger/SkDebugCanvas.cpp
@@ -427,12 +427,13 @@ void SkDebugCanvas::onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& cent
void SkDebugCanvas::onDrawImage(const SkImage* image, SkScalar left, SkScalar top,
const SkPaint* paint) {
- SkDebugf("SkDebugCanvas::onDrawImage unimplemented\n");
+ this->addDrawCommand(new SkDrawImageCommand(image, left, top, paint));
}
void SkDebugCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst,
const SkPaint* paint SRC_RECT_CONSTRAINT_PARAM(constraint)) {
- SkDebugf("SkDebugCanvas::onDrawImageRect unimplemented\n");
+ SRC_RECT_CONSTRAINT_LOCAL_DEFAULT(constraint);
+ this->addDrawCommand(new SkDrawImageRectCommand(image, src, dst, paint, constraint));
}
void SkDebugCanvas::onDrawOval(const SkRect& oval, const SkPaint& paint) {
« 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