Index: src/effects/SkBlurImageFilter.cpp |
diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp |
index ccc7ec386631cff597223232d3d2ab34cb2be3cb..67b0511480eaff63c99272f722c2bb2951f71e3a 100644 |
--- a/src/effects/SkBlurImageFilter.cpp |
+++ b/src/effects/SkBlurImageFilter.cpp |
@@ -236,6 +236,21 @@ void SkBlurImageFilter::computeFastBounds(const SkRect& src, SkRect* dst) const |
dst->outset(SkScalarMul(fSigma.width(), SkIntToScalar(3)), |
SkScalarMul(fSigma.height(), SkIntToScalar(3))); |
} |
+ |
+bool SkBlurImageFilter::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 sigma, localSigma = SkVector::Make(fSigma.width(), fSigma.height()); |
+ ctm.mapVectors(&sigma, &localSigma, 1); |
+ bounds.outset(SkScalarCeilToInt(SkScalarMul(sigma.x(), SkIntToScalar(3))), |
+ SkScalarCeilToInt(SkScalarMul(sigma.y(), SkIntToScalar(3)))); |
+ *dst = bounds; |
+ return true; |
+} |
+ |
bool SkBlurImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const SkMatrix& ctm, |
SkBitmap* result, SkIPoint* offset) { |
#if SK_SUPPORT_GPU |