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

Unified Diff: src/core/SkRecorder.cpp

Issue 1228083004: add src-rect-constraint to drawImageRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: propogate Constraint into SkDevice 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
Index: src/core/SkRecorder.cpp
diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp
index 0413860e9dc1ff26f9ca8b424bec1fb22625fa7b..e217380488d1819c4d65d11de6099364d4b7a7a7 100644
--- a/src/core/SkRecorder.cpp
+++ b/src/core/SkRecorder.cpp
@@ -227,8 +227,11 @@ void SkRecorder::onDrawImage(const SkImage* image, SkScalar left, SkScalar top,
void SkRecorder::onDrawImageRect(const SkImage* image, const SkRect* src,
const SkRect& dst,
- const SkPaint* paint) {
- APPEND(DrawImageRect, this->copy(paint), image, this->copy(src), dst);
+ const SkPaint* paint SRC_RECT_CONSTRAINT_PARAM(constraint)) {
+#ifdef SK_SUPPORT_LEGACY_ONDRAWIMAGERECT
+ SrcRectConstraint constraint = kStrict_SrcRectConstraint;
+#endif
+ APPEND(DrawImageRect, this->copy(paint), image, this->copy(src), dst, constraint);
}
void SkRecorder::onDrawImageNine(const SkImage* image, const SkIRect& center,
« include/core/SkCanvas.h ('K') | « src/core/SkRecorder.h ('k') | src/core/SkRecords.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698