summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsenorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-02 19:13:11 +0000
committersenorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-02 19:13:11 +0000
commit5c72c806b21e5158f7d40cb26f6ce8a68be3d827 (patch)
tree6423d3ead3cc5ca651630a1ad18f74e16fefa5be
parent6162e3ee456ead2de0e8fe94fe7f32b93e7e088e (diff)
downloadsrc-5c72c806b21e5158f7d40cb26f6ce8a68be3d827.tar.gz
Fix for SkMatrixConvolutionImageFilter with large borders.
Intersect the requested processing rect with the destination bounds. R=junov@chromium.org Review URL: https://codereview.chromium.org/267863004 git-svn-id: http://skia.googlecode.com/svn/trunk/src@14543 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--effects/SkMatrixConvolutionImageFilter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/effects/SkMatrixConvolutionImageFilter.cpp b/effects/SkMatrixConvolutionImageFilter.cpp
index be1dcb4c..f6bc6a1f 100644
--- a/effects/SkMatrixConvolutionImageFilter.cpp
+++ b/effects/SkMatrixConvolutionImageFilter.cpp
@@ -151,9 +151,10 @@ public:
template<class PixelFetcher, bool convolveAlpha>
void SkMatrixConvolutionImageFilter::filterPixels(const SkBitmap& src,
SkBitmap* result,
- const SkIRect& rect,
+ const SkIRect& r,
const SkIRect& bounds) const {
- if (rect.isEmpty()) {
+ SkIRect rect(r);
+ if (!rect.intersect(bounds)) {
return;
}
for (int y = rect.fTop; y < rect.fBottom; ++y) {