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

Unified Diff: src/core/SkImageFilter.cpp

Issue 1702683002: Image filters: change applyCropRect() to take a src rect. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | « include/core/SkImageFilter.h ('k') | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageFilter.cpp
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index 94d6ab6a16567fe0d681c77b56ccee5d2b65752e..55abb8887f2476c44dbbdb9b377d23b206a348f4 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -394,16 +394,9 @@ bool SkImageFilter::asAColorFilter(SkColorFilter** filterPtr) const {
return true;
}
-bool SkImageFilter::applyCropRect(const Context& ctx, const SkBitmap& src,
- const SkIPoint& srcOffset, SkIRect* dstBounds,
- SkIRect* srcBounds) const {
- SkIRect storage;
- if (!srcBounds) {
- srcBounds = &storage;
- }
- src.getBounds(srcBounds);
- srcBounds->offset(srcOffset);
- this->onFilterNodeBounds(*srcBounds, ctx.ctm(), dstBounds, kForward_MapDirection);
+bool SkImageFilter::applyCropRect(const Context& ctx, const SkIRect& srcBounds,
+ SkIRect* dstBounds) const {
+ this->onFilterNodeBounds(srcBounds, ctx.ctm(), dstBounds, kForward_MapDirection);
fCropRect.applyTo(*dstBounds, ctx.ctm(), dstBounds);
// Intersect against the clip bounds, in case the crop rect has
// grown the bounds beyond the original clip. This can happen for
« no previous file with comments | « include/core/SkImageFilter.h ('k') | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698