| 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 11 matching lines...) Expand all Loading... |
| 22 #include "core/SVGNames.h" | 22 #include "core/SVGNames.h" |
| 23 #include "core/svg/graphics/filters/SVGFilterBuilder.h" | 23 #include "core/svg/graphics/filters/SVGFilterBuilder.h" |
| 24 | 24 |
| 25 namespace blink { | 25 namespace blink { |
| 26 | 26 |
| 27 template <> | 27 template <> |
| 28 const SVGEnumerationStringEntries& | 28 const SVGEnumerationStringEntries& |
| 29 getStaticStringEntries<ChannelSelectorType>() { | 29 getStaticStringEntries<ChannelSelectorType>() { |
| 30 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); | 30 DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); |
| 31 if (entries.isEmpty()) { | 31 if (entries.isEmpty()) { |
| 32 entries.append(std::make_pair(CHANNEL_R, "R")); | 32 entries.push_back(std::make_pair(CHANNEL_R, "R")); |
| 33 entries.append(std::make_pair(CHANNEL_G, "G")); | 33 entries.push_back(std::make_pair(CHANNEL_G, "G")); |
| 34 entries.append(std::make_pair(CHANNEL_B, "B")); | 34 entries.push_back(std::make_pair(CHANNEL_B, "B")); |
| 35 entries.append(std::make_pair(CHANNEL_A, "A")); | 35 entries.push_back(std::make_pair(CHANNEL_A, "A")); |
| 36 } | 36 } |
| 37 return entries; | 37 return entries; |
| 38 } | 38 } |
| 39 | 39 |
| 40 inline SVGFEDisplacementMapElement::SVGFEDisplacementMapElement( | 40 inline SVGFEDisplacementMapElement::SVGFEDisplacementMapElement( |
| 41 Document& document) | 41 Document& document) |
| 42 : SVGFilterPrimitiveStandardAttributes(SVGNames::feDisplacementMapTag, | 42 : SVGFilterPrimitiveStandardAttributes(SVGNames::feDisplacementMapTag, |
| 43 document), | 43 document), |
| 44 m_scale(SVGAnimatedNumber::create(this, | 44 m_scale(SVGAnimatedNumber::create(this, |
| 45 SVGNames::scaleAttr, | 45 SVGNames::scaleAttr, |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 FilterEffect* input2 = filterBuilder->getEffectById( | 116 FilterEffect* input2 = filterBuilder->getEffectById( |
| 117 AtomicString(m_in2->currentValue()->value())); | 117 AtomicString(m_in2->currentValue()->value())); |
| 118 ASSERT(input1 && input2); | 118 ASSERT(input1 && input2); |
| 119 | 119 |
| 120 FilterEffect* effect = FEDisplacementMap::create( | 120 FilterEffect* effect = FEDisplacementMap::create( |
| 121 filter, m_xChannelSelector->currentValue()->enumValue(), | 121 filter, m_xChannelSelector->currentValue()->enumValue(), |
| 122 m_yChannelSelector->currentValue()->enumValue(), | 122 m_yChannelSelector->currentValue()->enumValue(), |
| 123 m_scale->currentValue()->value()); | 123 m_scale->currentValue()->value()); |
| 124 FilterEffectVector& inputEffects = effect->inputEffects(); | 124 FilterEffectVector& inputEffects = effect->inputEffects(); |
| 125 inputEffects.reserveCapacity(2); | 125 inputEffects.reserveCapacity(2); |
| 126 inputEffects.append(input1); | 126 inputEffects.push_back(input1); |
| 127 inputEffects.append(input2); | 127 inputEffects.push_back(input2); |
| 128 return effect; | 128 return effect; |
| 129 } | 129 } |
| 130 | 130 |
| 131 } // namespace blink | 131 } // namespace blink |
| OLD | NEW |