Index: src/effects/SkXfermodeImageFilter.cpp |
diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp |
index fbceedb0dd6e0b53e605660a19384a1b48ad234d..3f702e69c4ccfa125acd1b211259f01745474c11 100644 |
--- a/src/effects/SkXfermodeImageFilter.cpp |
+++ b/src/effects/SkXfermodeImageFilter.cpp |
@@ -57,11 +57,15 @@ bool SkXfermodeImageFilter::onFilterImage(Proxy* proxy, |
} |
SkIRect bounds, foregroundBounds; |
- if (!applyCropRect(ctx, foreground, foregroundOffset, &foregroundBounds)) { |
+ SkIRect foregroundSrcBounds = foreground.bounds(); |
+ foregroundSrcBounds.offset(foregroundOffset); |
+ if (!applyCropRect(ctx, foregroundSrcBounds, &foregroundBounds)) { |
foregroundBounds.setEmpty(); |
foreground.reset(); |
} |
- if (!applyCropRect(ctx, background, backgroundOffset, &bounds)) { |
+ SkIRect backgroundSrcBounds = background.bounds(); |
+ backgroundSrcBounds.offset(backgroundOffset); |
+ if (!applyCropRect(ctx, backgroundSrcBounds, &bounds)) { |
bounds.setEmpty(); |
background.reset(); |
} |