Chromium Code Reviews| Index: include/core/SkColorFilter.h |
| diff --git a/include/core/SkColorFilter.h b/include/core/SkColorFilter.h |
| index 14d33069f01ae9a74c2ae04d15db5758a20ef58d..1ab4ff37203bad7606b0a9287f79dacd29766691 100644 |
| --- a/include/core/SkColorFilter.h |
| +++ b/include/core/SkColorFilter.h |
| @@ -134,6 +134,9 @@ public: |
| /** Construct a colorfilter whose effect is to first apply the inner filter and then apply |
| * the outer filter to the result of the inner's. |
| * The reference counts for outer and inner are incremented. |
| + * |
| + * Due to internal limits, it is possible that this will return NULL, so the caller must |
| + * always check. |
| */ |
| static SkColorFilter* CreateComposeFilter(SkColorFilter* outer, SkColorFilter* inner); |
| @@ -159,6 +162,16 @@ protected: |
| SkColorFilter() {} |
| private: |
| + /* |
| + * Returns 1 if this is a single filter (not a composition of other filters), otherwise it |
|
robertphillips
2015/03/05 15:20:43
reutrns
|
| + * reutrns the number of leaf-node filters in a composition. This should be the same value |
| + * as the number of GrFragmentProcessors returned by asFragmentProcessors's array parameter. |
| + * |
| + * e.g. compose(filter, compose(compose(filter, filter), filter)) --> 4 |
| + */ |
| + virtual int privateComposedFilterCount() const { return 1; } |
|
Stephen White
2015/03/05 15:19:11
Nit: maybe this could just be privateFilterCount()
|
| + friend class SkComposeColorFilter; |
| + |
| typedef SkFlattenable INHERITED; |
| }; |