Index: include/core/SkImageFilter.h |
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h |
index 56ebc2b77b67caa55dea89c12b64245282946cee..13ffa2b03fab890ae546d120ad86959b5cac336e 100644 |
--- a/include/core/SkImageFilter.h |
+++ b/include/core/SkImageFilter.h |
@@ -146,6 +146,14 @@ public: |
SK_DEFINE_FLATTENABLE_TYPE(SkImageFilter) |
protected: |
+ // Filters either 1, 2 or N number of inputs |
+ // No filter should reasonably have more than 65535 inputs |
+ enum MaxInputCount { |
+ kOneInput = 1, |
+ kTwoInputs = 2, |
+ kManyInputs = 65535, |
+ }; |
+ |
SkImageFilter(int inputCount, SkImageFilter** inputs, const CropRect* cropRect = NULL); |
// Convenience constructor for 1-input filters. |
@@ -156,7 +164,7 @@ protected: |
virtual ~SkImageFilter(); |
- explicit SkImageFilter(SkFlattenableReadBuffer& rb); |
+ explicit SkImageFilter(SkFlattenableReadBuffer& rb, int maxInputCount); |
virtual void flatten(SkFlattenableWriteBuffer& wb) const SK_OVERRIDE; |