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

Unified Diff: src/effects/SkXfermodeImageFilter.cpp

Issue 1842033005: Image filters: fix crop rect application in SkXfermodeImageFilter. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix formatting. Created 4 years, 9 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 | « gm/xfermodeimagefilter.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 8cd75127baadfa21d3fd57bcc58bca8c9dfdc23e..80d7c0685872f633b26296053d6c754f9775918b 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -64,21 +64,13 @@ bool SkXfermodeImageFilter::onFilterImageDeprecated(Proxy* proxy,
foreground.reset();
}
- SkIRect bounds, foregroundBounds;
- SkIRect foregroundSrcBounds = foreground.bounds();
- foregroundSrcBounds.offset(foregroundOffset);
- if (!applyCropRect(ctx, foregroundSrcBounds, &foregroundBounds)) {
- foregroundBounds.setEmpty();
- foreground.reset();
- }
- SkIRect backgroundSrcBounds = background.bounds();
- backgroundSrcBounds.offset(backgroundOffset);
- if (!applyCropRect(ctx, backgroundSrcBounds, &bounds)) {
- bounds.setEmpty();
- background.reset();
- }
- bounds.join(foregroundBounds);
- if (bounds.isEmpty()) {
+ SkIRect foregroundBounds = foreground.bounds();
+ foregroundBounds.offset(foregroundOffset);
+ SkIRect srcBounds = background.bounds();
+ srcBounds.offset(backgroundOffset);
+ srcBounds.join(foregroundBounds);
+ SkIRect bounds;
+ if (!this->applyCropRect(ctx, srcBounds, &bounds)) {
return false;
}
« no previous file with comments | « gm/xfermodeimagefilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698