OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Oliver Hunt <oliver@nerget.com> | 2 * Copyright (C) 2006 Oliver Hunt <oliver@nerget.com> |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 bool SVGFEDisplacementMapElement::isSupportedAttribute(const QualifiedName& attr
Name) | 62 bool SVGFEDisplacementMapElement::isSupportedAttribute(const QualifiedName& attr
Name) |
63 { | 63 { |
64 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 64 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
65 if (supportedAttributes.isEmpty()) { | 65 if (supportedAttributes.isEmpty()) { |
66 supportedAttributes.add(SVGNames::inAttr); | 66 supportedAttributes.add(SVGNames::inAttr); |
67 supportedAttributes.add(SVGNames::in2Attr); | 67 supportedAttributes.add(SVGNames::in2Attr); |
68 supportedAttributes.add(SVGNames::xChannelSelectorAttr); | 68 supportedAttributes.add(SVGNames::xChannelSelectorAttr); |
69 supportedAttributes.add(SVGNames::yChannelSelectorAttr); | 69 supportedAttributes.add(SVGNames::yChannelSelectorAttr); |
70 supportedAttributes.add(SVGNames::scaleAttr); | 70 supportedAttributes.add(SVGNames::scaleAttr); |
71 } | 71 } |
72 return supportedAttributes.contains<QualifiedName, SVGAttributeHashTranslato
r>(attrName); | 72 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
73 } | 73 } |
74 | 74 |
75 void SVGFEDisplacementMapElement::parseAttribute(const QualifiedName& name, cons
t AtomicString& value) | 75 void SVGFEDisplacementMapElement::parseAttribute(const QualifiedName& name, cons
t AtomicString& value) |
76 { | 76 { |
77 if (!isSupportedAttribute(name)) { | 77 if (!isSupportedAttribute(name)) { |
78 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); | 78 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); |
79 return; | 79 return; |
80 } | 80 } |
81 | 81 |
82 if (name == SVGNames::xChannelSelectorAttr) { | 82 if (name == SVGNames::xChannelSelectorAttr) { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 157 |
158 RefPtr<FilterEffect> effect = FEDisplacementMap::create(filter, xChannelSele
ctor(), yChannelSelector(), scale()); | 158 RefPtr<FilterEffect> effect = FEDisplacementMap::create(filter, xChannelSele
ctor(), yChannelSelector(), scale()); |
159 FilterEffectVector& inputEffects = effect->inputEffects(); | 159 FilterEffectVector& inputEffects = effect->inputEffects(); |
160 inputEffects.reserveCapacity(2); | 160 inputEffects.reserveCapacity(2); |
161 inputEffects.append(input1); | 161 inputEffects.append(input1); |
162 inputEffects.append(input2); | 162 inputEffects.append(input2); |
163 return effect.release(); | 163 return effect.release(); |
164 } | 164 } |
165 | 165 |
166 } | 166 } |
OLD | NEW |