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

Unified Diff: src/effects/SkMorphologyImageFilter.cpp

Issue 481273005: Fix recursive computation of filter bounds for drop shadow, (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use an identity matrix for the test, not an uninit one :( Created 6 years, 4 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/effects/SkDropShadowImageFilter.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkMorphologyImageFilter.cpp
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index eef2a7d62323efdf49876a18d8213f53fc551c13..6a6dd4d451613783405e5b85207177c1c0c2dc72 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -248,13 +248,13 @@ void SkMorphologyImageFilter::computeFastBounds(const SkRect& src, SkRect* dst)
bool SkMorphologyImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm,
SkIRect* dst) const {
SkIRect bounds = src;
- if (getInput(0) && !getInput(0)->filterBounds(src, ctm, &bounds)) {
- return false;
- }
SkVector radius = SkVector::Make(SkIntToScalar(this->radius().width()),
SkIntToScalar(this->radius().height()));
ctm.mapVectors(&radius, 1);
bounds.outset(SkScalarCeilToInt(radius.x()), SkScalarCeilToInt(radius.y()));
+ if (getInput(0) && !getInput(0)->filterBounds(bounds, ctm, &bounds)) {
+ return false;
+ }
*dst = bounds;
return true;
}
« no previous file with comments | « src/effects/SkDropShadowImageFilter.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698