diff options
Diffstat (limited to 'effects/SkMatrixConvolutionImageFilter.cpp')
-rw-r--r-- | effects/SkMatrixConvolutionImageFilter.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/effects/SkMatrixConvolutionImageFilter.cpp b/effects/SkMatrixConvolutionImageFilter.cpp index 3c9fc877..f6bc6a1f 100644 --- a/effects/SkMatrixConvolutionImageFilter.cpp +++ b/effects/SkMatrixConvolutionImageFilter.cpp @@ -151,8 +151,12 @@ public: template<class PixelFetcher, bool convolveAlpha> void SkMatrixConvolutionImageFilter::filterPixels(const SkBitmap& src, SkBitmap* result, - const SkIRect& rect, + const SkIRect& r, const SkIRect& bounds) const { + SkIRect rect(r); + if (!rect.intersect(bounds)) { + return; + } for (int y = rect.fTop; y < rect.fBottom; ++y) { SkPMColor* dptr = result->getAddr32(rect.fLeft - bounds.fLeft, y - bounds.fTop); for (int x = rect.fLeft; x < rect.fRight; ++x) { |