Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(769)

Unified Diff: src/effects/SkMatrixConvolutionImageFilter.cpp

Issue 267863004: Fix for SkMatrixConvolutionImageFilter with large borders. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Simplify further Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/ImageFilterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkMatrixConvolutionImageFilter.cpp
diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp
index be1dcb4ce970e9ad859bcc6f8fffb4fe9bb795c8..f6bc6a1f1f47c30db1a0093cfc40ce4d829e20bf 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) {
« no previous file with comments | « no previous file | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698