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

Unified Diff: src/effects/SkXfermodeImageFilter.cpp

Issue 1702683002: Image filters: change applyCropRect() to take a src rect. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | « src/effects/SkPaintImageFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « src/effects/SkPaintImageFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698