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

Unified Diff: include/core/SkImageFilter.h

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 | « gm/imagefiltersgraph.cpp ('k') | src/core/SkImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImageFilter.h
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h
index 3a7cb23d5e399a4fd552d167943c1e01f91f81e3..de357188e6bc55f15be1045dbd919eb5fc28ce1a 100644
--- a/include/core/SkImageFilter.h
+++ b/include/core/SkImageFilter.h
@@ -337,6 +337,14 @@ protected:
// no inputs.
virtual bool onFilterBounds(const SkIRect&, const SkMatrix&, SkIRect*) const;
+ // Helper function which invokes filter processing on the input at the
+ // specified "index". If the input is null, it leaves "result" and
+ // "offset" untouched, and returns true. If the input is non-null, it
+ // calls filterImage() on that input, and returns true on success.
+ // i.e., return !getInput(index) || getInput(index)->filterImage(...);
+ bool filterInput(int index, Proxy*, const SkBitmap& src, const Context&,
+ SkBitmap* result, SkIPoint* offset) const;
+
/**
* Return true (and return a ref'd colorfilter) if this node in the DAG is just a
* colorfilter w/o CropRect constraints.
« no previous file with comments | « gm/imagefiltersgraph.cpp ('k') | src/core/SkImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698