aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar senorblanco <senorblanco@chromium.org>2015-10-15 12:15:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-15 12:15:13 -0700
commitb9519f86bbce946e505980a4fa950fdc4bcf74ab (patch)
tree68d1ecb2248d0ff2b3a8e31c32731a208a3ce23b /include
parent5f5527fb46664297fbeb575033886a757eb44147 (diff)
Image Filters: refactor all CPU input processing into a filterInput helper function.
No change in behaviour; this is a straight refactoring. BUG=skia:3194 Review URL: https://codereview.chromium.org/1404743005
Diffstat (limited to 'include')
-rw-r--r--include/core/SkImageFilter.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h
index 3a7cb23d5e..de357188e6 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.