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

Unified Diff: src/effects/SkDisplacementMapEffect.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/SkComposeImageFilter.cpp ('k') | src/effects/SkDropShadowImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkDisplacementMapEffect.cpp
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index 17f96df75080cd194fd1b717b965df1807b6bc88..32678a40d5414940bf12efe9f2886f0b20f34593 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -212,11 +212,9 @@ bool SkDisplacementMapEffect::onFilterImage(Proxy* proxy,
SkBitmap* dst,
SkIPoint* offset) const {
SkBitmap displ = src, color = src;
- const SkImageFilter* colorInput = this->getColorInput();
- const SkImageFilter* displInput = this->getDisplacementInput();
SkIPoint colorOffset = SkIPoint::Make(0, 0), displOffset = SkIPoint::Make(0, 0);
- if ((colorInput && !colorInput->filterImage(proxy, src, ctx, &color, &colorOffset)) ||
- (displInput && !displInput->filterImage(proxy, src, ctx, &displ, &displOffset))) {
+ if (!this->filterInput(1, proxy, src, ctx, &color, &colorOffset) ||
+ !this->filterInput(0, proxy, src, ctx, &displ, &displOffset)) {
return false;
}
if ((displ.colorType() != kN32_SkColorType) ||
« no previous file with comments | « src/effects/SkComposeImageFilter.cpp ('k') | src/effects/SkDropShadowImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698