Index: src/effects/SkDropShadowImageFilter.cpp |
diff --git a/src/effects/SkDropShadowImageFilter.cpp b/src/effects/SkDropShadowImageFilter.cpp |
index 61093784faf0b2ad915c7048149822bac481882c..87dfa92f9bf3bf28469faa827e4aa1b905afb542 100644 |
--- a/src/effects/SkDropShadowImageFilter.cpp |
+++ b/src/effects/SkDropShadowImageFilter.cpp |
@@ -95,3 +95,18 @@ bool SkDropShadowImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& source |
offset->fY = bounds.fTop; |
return true; |
} |
+ |
+void SkDropShadowImageFilter::computeFastBounds(const SkRect& src, SkRect* dst) const { |
+ if (getInput(0)) { |
+ getInput(0)->computeFastBounds(src, dst); |
+ } else { |
+ *dst = src; |
+ } |
+ |
+ SkRect shadowBounds = *dst; |
+ shadowBounds.offset(fDx, fDy); |
+ shadowBounds.outset(SkScalarMul(fSigmaX, SkIntToScalar(3)), |
+ SkScalarMul(fSigmaY, SkIntToScalar(3))); |
+ dst->join(shadowBounds); |
+} |
+ |