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

Unified Diff: src/core/SkImageFilter.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 | « include/core/SkImageFilter.h ('k') | src/core/SkLocalMatrixImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageFilter.cpp
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index bb7927669c175e0c9561af9b270e4ecc6668b793..1de8fafac25d96efc060ed329c207020704e3eed 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -226,7 +226,7 @@ SkImageFilter::SkImageFilter(int inputCount, SkReadBuffer& buffer)
void SkImageFilter::flatten(SkWriteBuffer& buffer) const {
buffer.writeInt(fInputCount);
for (int i = 0; i < fInputCount; i++) {
- SkImageFilter* input = getInput(i);
+ SkImageFilter* input = this->getInput(i);
buffer.writeBool(input != nullptr);
if (input != nullptr) {
buffer.writeFlattenable(input);
@@ -262,6 +262,13 @@ bool SkImageFilter::filterImage(Proxy* proxy, const SkBitmap& src,
return false;
}
+bool SkImageFilter::filterInput(int index, Proxy* proxy, const SkBitmap& src,
+ const Context& context,
+ SkBitmap* result, SkIPoint* offset) const {
+ SkImageFilter* input = this->getInput(index);
+ return !input || input->filterImage(proxy, src, context, result, offset);
+}
+
bool SkImageFilter::filterBounds(const SkIRect& src, const SkMatrix& ctm,
SkIRect* dst) const {
SkASSERT(dst);
« no previous file with comments | « include/core/SkImageFilter.h ('k') | src/core/SkLocalMatrixImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698