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

Unified Diff: src/effects/SkOffsetImageFilter.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/SkMorphologyImageFilter.cpp ('k') | src/effects/SkTileImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkOffsetImageFilter.cpp
diff --git a/src/effects/SkOffsetImageFilter.cpp b/src/effects/SkOffsetImageFilter.cpp
index 551902b7daec963f7c3e3de88f8369b09d4084b5..9da026b2793b8998a321cacb20cb9cf6d1e4591b 100644
--- a/src/effects/SkOffsetImageFilter.cpp
+++ b/src/effects/SkOffsetImageFilter.cpp
@@ -18,7 +18,6 @@ bool SkOffsetImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& source,
const Context& ctx,
SkBitmap* result,
SkIPoint* offset) const {
- SkImageFilter* input = getInput(0);
SkBitmap src = source;
SkIPoint srcOffset = SkIPoint::Make(0, 0);
#ifdef SK_DISABLE_OFFSETIMAGEFILTER_OPTIMIZATION
@@ -26,7 +25,7 @@ bool SkOffsetImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& source,
#else
if (!cropRectIsSet()) {
#endif
- if (input && !input->filterImage(proxy, source, ctx, &src, &srcOffset)) {
+ if (!this->filterInput(0, proxy, source, ctx, &src, &srcOffset)) {
return false;
}
@@ -37,7 +36,7 @@ bool SkOffsetImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& source,
offset->fY = srcOffset.fY + SkScalarRoundToInt(vec.fY);
*result = src;
} else {
- if (input && !input->filterImage(proxy, source, ctx, &src, &srcOffset)) {
+ if (!this->filterInput(0, proxy, source, ctx, &src, &srcOffset)) {
return false;
}
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/effects/SkTileImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698