Index: src/effects/SkMergeImageFilter.cpp |
diff --git a/src/effects/SkMergeImageFilter.cpp b/src/effects/SkMergeImageFilter.cpp |
index a755fe68cb768201643ba3ab7687d90360d76058..b90c830725bf6d9cba9e0ae77099f1cf557a0d80 100755 |
--- a/src/effects/SkMergeImageFilter.cpp |
+++ b/src/effects/SkMergeImageFilter.cpp |
@@ -11,9 +11,6 @@ |
#include "SkFlattenableBuffers.h" |
#include "SkValidationUtils.h" |
-// Use 65535 as an arbitrary large number of inputs that this image filter should never overflow |
-static const int kMaxInputs = 65535; |
- |
/////////////////////////////////////////////////////////////////////////////// |
void SkMergeImageFilter::initAllocModes() { |
@@ -56,7 +53,7 @@ SkMergeImageFilter::SkMergeImageFilter(SkImageFilter* first, SkImageFilter* seco |
SkMergeImageFilter::SkMergeImageFilter(SkImageFilter* filters[], int count, |
const SkXfermode::Mode modes[], |
const CropRect* cropRect) : INHERITED(count, filters, cropRect) { |
- SkASSERT(count <= kMaxInputs); |
+ SkASSERT(count >= 0); |
this->initModes(modes); |
} |
@@ -161,7 +158,7 @@ void SkMergeImageFilter::flatten(SkFlattenableWriteBuffer& buffer) const { |
} |
SkMergeImageFilter::SkMergeImageFilter(SkFlattenableReadBuffer& buffer) |
- : INHERITED(kMaxInputs, buffer) { |
+ : INHERITED(-1, buffer) { |
bool hasModes = buffer.readBool(); |
if (hasModes) { |
this->initAllocModes(); |