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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/filters/FEMerge.cpp

Issue 1368113002: Allow zero inputs for feMerge (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase; Drop assert. Created 5 years, 2 months 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGFEMergeElement.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2013 Google Inc. All rights reserved. 5 * Copyright (C) 2013 Google Inc. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 SkImageFilter::CropRect rect = getCropRect(builder->cropOffset()); 53 SkImageFilter::CropRect rect = getCropRect(builder->cropOffset());
54 return adoptRef(SkMergeImageFilter::Create(inputs.get(), size, 0, &rect)); 54 return adoptRef(SkMergeImageFilter::Create(inputs.get(), size, 0, &rect));
55 } 55 }
56 56
57 TextStream& FEMerge::externalRepresentation(TextStream& ts, int indent) const 57 TextStream& FEMerge::externalRepresentation(TextStream& ts, int indent) const
58 { 58 {
59 writeIndent(ts, indent); 59 writeIndent(ts, indent);
60 ts << "[feMerge"; 60 ts << "[feMerge";
61 FilterEffect::externalRepresentation(ts); 61 FilterEffect::externalRepresentation(ts);
62 unsigned size = numberOfEffectInputs(); 62 unsigned size = numberOfEffectInputs();
63 ASSERT(size > 0);
64 ts << " mergeNodes=\"" << size << "\"]\n"; 63 ts << " mergeNodes=\"" << size << "\"]\n";
65 for (unsigned i = 0; i < size; ++i) 64 for (unsigned i = 0; i < size; ++i)
66 inputEffect(i)->externalRepresentation(ts, indent + 1); 65 inputEffect(i)->externalRepresentation(ts, indent + 1);
67 return ts; 66 return ts;
68 } 67 }
69 68
70 } // namespace blink 69 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGFEMergeElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698