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

Unified Diff: src/effects/SkBlurImageFilter.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 | « src/core/SkImageFilter.cpp ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBlurImageFilter.cpp
diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp
index a1d6a2f80e0753eea2cfd63cfbe7a816f10c0b18..6ba9e0b640fcb11a7e133b06fa4c1567cec49f78 100644
--- a/src/effects/SkBlurImageFilter.cpp
+++ b/src/effects/SkBlurImageFilter.cpp
@@ -82,8 +82,10 @@ bool SkBlurImageFilter::onFilterImage(Proxy* proxy,
return false;
}
- SkIRect srcBounds, dstBounds;
- if (!this->applyCropRect(this->mapContext(ctx), src, srcOffset, &dstBounds, &srcBounds)) {
+ SkIRect srcBounds = src.bounds();
+ srcBounds.offset(srcOffset);
+ SkIRect dstBounds;
+ if (!this->applyCropRect(this->mapContext(ctx), srcBounds, &dstBounds)) {
return false;
}
if (!srcBounds.intersect(dstBounds)) {
@@ -204,8 +206,10 @@ bool SkBlurImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const
if (!this->filterInputGPU(0, proxy, src, ctx, &input, &srcOffset)) {
return false;
}
- SkIRect srcBounds, dstBounds;
- if (!this->applyCropRect(this->mapContext(ctx), input, srcOffset, &dstBounds, &srcBounds)) {
+ SkIRect srcBounds = input.bounds();
+ srcBounds.offset(srcOffset);
+ SkIRect dstBounds;
+ if (!this->applyCropRect(this->mapContext(ctx), srcBounds, &dstBounds)) {
return false;
}
if (!srcBounds.intersect(dstBounds)) {
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | src/effects/SkColorFilterImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698