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

Unified Diff: src/effects/SkBlurImageFilter.cpp

Issue 1807673005: Image filters: fix the zero-sigma fast path in SkBlurImageFilter. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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 | tests/ImageFilterTest.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 151398213d933a409e0ddc16900ab9b8402bbc32..249e69779deec6ff2490f2be5bbad3ed967f2bf6 100644
--- a/src/effects/SkBlurImageFilter.cpp
+++ b/src/effects/SkBlurImageFilter.cpp
@@ -104,7 +104,7 @@ bool SkBlurImageFilter::onFilterImageDeprecated(Proxy* proxy,
}
if (kernelSizeX == 0 && kernelSizeY == 0) {
- src.extractSubset(dst, srcBounds);
+ src.extractSubset(dst, srcBounds.makeOffset(-srcOffset.x(), -srcOffset.y()));
offset->fX = srcBounds.x();
offset->fY = srcBounds.y();
return true;
@@ -218,7 +218,7 @@ bool SkBlurImageFilter::filterImageGPUDeprecated(Proxy* proxy, const SkBitmap& s
}
SkVector sigma = map_sigma(fSigma, ctx.ctm());
if (sigma.x() == 0 && sigma.y() == 0) {
- input.extractSubset(result, srcBounds);
+ input.extractSubset(result, srcBounds.makeOffset(-srcOffset.x(), -srcOffset.y()));
offset->fX = srcBounds.x();
offset->fY = srcBounds.y();
return true;
« no previous file with comments | « no previous file | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698