diff options
author | 2014-08-25 09:06:19 -0700 | |
---|---|---|
committer | 2014-08-25 09:06:19 -0700 | |
commit | 38cb688bd0e17021bb140bbc15ac1a7b8f182939 (patch) | |
tree | 2c720f5b9019ee45763b53973e422bdd25f5bf89 /src/effects/SkDropShadowImageFilter.cpp | |
parent | 28648fe4a69b0cee8df42b5966e4e645c3aabefb (diff) |
Revert of Fix recursive computation of filter bounds for drop shadow, (patchset #1 of https://codereview.chromium.org/481273005/)
Reason for revert:
This CL is currently breaking the Win7 and Win8 bots on some of the new tests (in DM).
Original issue's description:
> Fix recursive computation of filter bounds for drop shadow,
> morphology, blur.
>
> Because we're computing "backwards" from a clip rect of destination
> pixels to be filled to the required source pixels, we should use tail
> recursion rather than head recursion in onFilterBounds().
>
> This actually only makes a difference for drop-shadow, where
> the computation is non-commutative. Blur and morphology commute, but I
> moved them to tail recursion anyway for clarity (so all onFilterBounds
> use tail recursion).
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/28648fe4a69b0cee8df42b5966e4e645c3aabefb
R=bsalomon@google.com, senorblanco@chromium.org
TBR=bsalomon@google.com, senorblanco@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/504773003
Diffstat (limited to 'src/effects/SkDropShadowImageFilter.cpp')
-rw-r--r-- | src/effects/SkDropShadowImageFilter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/effects/SkDropShadowImageFilter.cpp b/src/effects/SkDropShadowImageFilter.cpp index 29d685becc..f1ebae8d97 100644 --- a/src/effects/SkDropShadowImageFilter.cpp +++ b/src/effects/SkDropShadowImageFilter.cpp @@ -121,6 +121,9 @@ void SkDropShadowImageFilter::computeFastBounds(const SkRect& src, SkRect* dst) bool SkDropShadowImageFilter::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 offsetVec = SkVector::Make(fDx, fDy); ctm.mapVectors(&offsetVec, 1); bounds.offset(-SkScalarCeilToInt(offsetVec.x()), @@ -130,9 +133,6 @@ bool SkDropShadowImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& bounds.outset(SkScalarCeilToInt(SkScalarMul(sigma.x(), SkIntToScalar(3))), SkScalarCeilToInt(SkScalarMul(sigma.y(), SkIntToScalar(3)))); bounds.join(src); - if (getInput(0) && !getInput(0)->filterBounds(bounds, ctm, &bounds)) { - return false; - } *dst = bounds; return true; } |