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

Unified Diff: src/effects/SkXfermodeImageFilter.cpp

Issue 1404743005: Image Filters: refactor all CPU input processing into a filterInput helper function. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Tweak comment Created 5 years, 2 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/SkTileImageFilter.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 2311bb75f4ef07d2b1c001a1c0bc8efc787635e4..0d4197fa68c10348420b568538691f29695b4c55 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -50,16 +50,12 @@ bool SkXfermodeImageFilter::onFilterImage(Proxy* proxy,
SkBitmap* dst,
SkIPoint* offset) const {
SkBitmap background = src, foreground = src;
- SkImageFilter* backgroundInput = this->getInput(0);
- SkImageFilter* foregroundInput = this->getInput(1);
SkIPoint backgroundOffset = SkIPoint::Make(0, 0);
- if (backgroundInput &&
- !backgroundInput->filterImage(proxy, src, ctx, &background, &backgroundOffset)) {
+ if (!this->filterInput(0, proxy, src, ctx, &background, &backgroundOffset)) {
background.reset();
}
SkIPoint foregroundOffset = SkIPoint::Make(0, 0);
- if (foregroundInput &&
- !foregroundInput->filterImage(proxy, src, ctx, &foreground, &foregroundOffset)) {
+ if (!this->filterInput(1, proxy, src, ctx, &foreground, &foregroundOffset)) {
foreground.reset();
}
« no previous file with comments | « src/effects/SkTileImageFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698