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

Unified Diff: src/utils/SkPaintFilterCanvas.cpp

Issue 1228083004: add src-rect-constraint to drawImageRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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 | « src/utils/SkNWayCanvas.cpp ('k') | src/utils/android/SkAndroidSDKCanvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkPaintFilterCanvas.cpp
diff --git a/src/utils/SkPaintFilterCanvas.cpp b/src/utils/SkPaintFilterCanvas.cpp
index 1abebef8cad5e517da186c9dc945d7ed22a15a3f..3e589e6146151e925c43c0967e955fe82787e9c6 100644
--- a/src/utils/SkPaintFilterCanvas.cpp
+++ b/src/utils/SkPaintFilterCanvas.cpp
@@ -74,9 +74,10 @@ void SkPaintFilterCanvas::onDrawBitmap(const SkBitmap& bm, SkScalar left, SkScal
}
void SkPaintFilterCanvas::onDrawBitmapRect(const SkBitmap& bm, const SkRect* src, const SkRect& dst,
- const SkPaint* paint, DrawBitmapRectFlags flags) {
+ const SkPaint* paint,
+ SK_VIRTUAL_CONSTRAINT_TYPE constraint) {
AutoPaintFilter apf(this, kBitmap_Type, paint);
- this->INHERITED::onDrawBitmapRect(bm, src, dst, apf.paint(), flags);
+ this->INHERITED::onDrawBitmapRect(bm, src, dst, apf.paint(), constraint);
}
void SkPaintFilterCanvas::onDrawImage(const SkImage* image, SkScalar left, SkScalar top,
@@ -86,9 +87,11 @@ void SkPaintFilterCanvas::onDrawImage(const SkImage* image, SkScalar left, SkSca
}
void SkPaintFilterCanvas::onDrawImageRect(const SkImage* image, const SkRect* src,
- const SkRect& dst, const SkPaint* paint) {
+ const SkRect& dst, const SkPaint* paint
+ SRC_RECT_CONSTRAINT_PARAM(constraint)) {
AutoPaintFilter apf(this, kBitmap_Type, paint);
- this->INHERITED::onDrawImageRect(image, src, dst, apf.paint());
+ this->INHERITED::onDrawImageRect(image, src, dst, apf.paint()
+ SRC_RECT_CONSTRAINT_ARG(constraint));
}
void SkPaintFilterCanvas::onDrawBitmapNine(const SkBitmap& bm, const SkIRect& center,
« no previous file with comments | « src/utils/SkNWayCanvas.cpp ('k') | src/utils/android/SkAndroidSDKCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698