aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-02 19:13:11 +0000
committerGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-02 19:13:11 +0000
commit8c7372bbe8949f2864bd3d9df00d85c5669a74b1 (patch)
treeec02528deb0735a6e65774c022797b15285fa447 /src
parent82bc432683cffc0a710f20d37d5176040984c0a9 (diff)
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@14543 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/effects/SkMatrixConvolutionImageFilter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp
index be1dcb4ce9..f6bc6a1f1f 100644
--- a/src/effects/SkMatrixConvolutionImageFilter.cpp
+++ b/src/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) {