| Index: src/effects/SkDisplacementMapEffect.cpp
|
| diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
|
| index 39222444d274b72934027224d29249e654b188f5..d0f134be40ff3d9da7a5fc475894f37388ccd28a 100644
|
| --- a/src/effects/SkDisplacementMapEffect.cpp
|
| +++ b/src/effects/SkDisplacementMapEffect.cpp
|
| @@ -257,11 +257,13 @@ void SkDisplacementMapEffect::computeFastBounds(const SkRect& src, SkRect* dst)
|
| bool SkDisplacementMapEffect::onFilterBounds(const SkIRect& src, const SkMatrix& ctm,
|
| SkIRect* dst) const {
|
| SkIRect bounds = src;
|
| - if (getColorInput() && !getColorInput()->filterBounds(src, ctm, &bounds)) {
|
| - return false;
|
| + SkVector scale = SkVector::Make(fScale, fScale);
|
| + ctm.mapVectors(&scale, 1);
|
| + bounds.outset(SkScalarCeilToInt(scale.fX * SK_ScalarHalf),
|
| + SkScalarCeilToInt(scale.fY * SK_ScalarHalf));
|
| + if (getColorInput()) {
|
| + return getColorInput()->filterBounds(bounds, ctm, dst);
|
| }
|
| - bounds.outset(SkScalarCeilToInt(fScale * SK_ScalarHalf),
|
| - SkScalarCeilToInt(fScale * SK_ScalarHalf));
|
| *dst = bounds;
|
| return true;
|
| }
|
|
|