aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-04 20:07:47 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-12-04 20:07:47 +0000
commitc84728d72a47415929464c5cf062300d86a91246 (patch)
treef58b4fe50ae82e23fee49e879e8490ef2957f617 /src/effects
parenta0b266d8170211d9f2a6f90ba9c889f0c1b6d1b6 (diff)
Changed maxInputCount for exact inputCount
Processing still had issue when the number of inputs was 0, so I changed my previous fix from a maximum input count to an exact input count. -1 is used when the input count isn't fixed (but still has to be a non-negative number). BUG= R=senorblanco@chromium.org, reed@google.com, sugoi@google.com, bsalomon@google.com Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/100803004 git-svn-id: http://skia.googlecode.com/svn/trunk@12492 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/effects')
-rwxr-xr-xsrc/effects/SkMergeImageFilter.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/effects/SkMergeImageFilter.cpp b/src/effects/SkMergeImageFilter.cpp
index a755fe68cb..b90c830725 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();