Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Unified Diff: src/effects/SkMergeImageFilter.cpp

Issue 100803004: Changed maxInputCount for exact inputCount (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fixed input count condition Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698