aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkColorFilter.h
diff options
context:
space:
mode:
authorGravatar Matt Sarett <msarett@google.com>2017-04-17 17:18:57 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-17 23:48:17 +0000
commitc1b879f11b937142f5478bd3b416b26be93dea23 (patch)
treebde95d4d09938f3332687e84eb9f5dfa9593b48e /include/core/SkColorFilter.h
parent30229ac6282981c28ced8f513c8d09684d9d0581 (diff)
SkColorSpaceXformer: Handle compose color filters
We could alternatively use the makeColorSpace() approach that we adoped for loopers and imagefilters, but this seems fine. This should finish xform canvas work on color filters. We have plenty of color filters that do math on colors, but only two that might actually hold colors. Bug: skia:6516 Change-Id: I1aee8c35d6886fdc149d4659d1bac2edc0d32b67 Reviewed-on: https://skia-review.googlesource.com/13649 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'include/core/SkColorFilter.h')
-rw-r--r--include/core/SkColorFilter.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h
index a59308774f..3fb27fab7a 100644
--- a/include/core/SkColorFilter.h
+++ b/include/core/SkColorFilter.h
@@ -172,6 +172,16 @@ private:
* e.g. compose(filter, compose(compose(filter, filter), filter)) --> 4
*/
virtual int privateComposedFilterCount() const { return 1; }
+
+ /*
+ * Returns true and sets |outer| and |inner| if this is a compose color filter.
+ * Returns false otherwise.
+ */
+ virtual bool asACompose(SkColorFilter** /*outer*/, SkColorFilter** /*inner*/) const {
+ return false;
+ }
+
+ friend class SkColorSpaceXformer;
friend class SkComposeColorFilter;
typedef SkFlattenable INHERITED;