Index: include/core/SkColorFilter.h |
diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h |
index bb628053a643527b72d876b8da88cd8302ee6f00..f8df86bec83063f72a5d63ba9ad2862991d4aeaa 100644 |
--- a/include/core/SkColorFilter.h |
+++ b/include/core/SkColorFilter.h |
@@ -98,6 +98,15 @@ public: |
virtual uint32_t getFlags() const { return 0; } |
/** |
+ * If this subclass can optimally createa composition with the inner filter, return it as |
+ * a new filter (which the caller must unref() when it is done). If no such optimization |
+ * is known, return NULL. |
+ * |
+ * e.g. result(color) == this_filter(inner(color)) |
+ */ |
+ virtual SkColorFilter* newComposed(const SkColorFilter* inner) const { return NULL; } |
Stephen White
2015/03/02 21:10:10
Naming nit: maybe this could be preConcat()? (or p
reed1
2015/03/02 21:19:19
preConcat for matrices, compose for patheffects, s
Stephen White
2015/03/02 21:32:52
Hmm.. createComposed()? The factories (and various
reed1
2015/03/02 21:39:11
Yea, I was going with surface/canvas use of new as
|
+ |
+ /** |
* Apply this colorfilter to the specified SkColor. This routine handles |
* converting to SkPMColor, calling the filter, and then converting back |
* to SkColor. This method is not virtual, but will call filterSpan() |