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

Side by Side Diff: Source/core/svg/SVGFECompositeElement.cpp

Issue 678163002: Oilpan: move SVG property hierarchy to the heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased upto r185213 Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/svg/SVGFECompositeElement.h ('k') | Source/core/svg/SVGFEConvolveMatrixElement.h » ('j') | 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, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 { 54 {
55 addToPropertyMap(m_k1); 55 addToPropertyMap(m_k1);
56 addToPropertyMap(m_k2); 56 addToPropertyMap(m_k2);
57 addToPropertyMap(m_k3); 57 addToPropertyMap(m_k3);
58 addToPropertyMap(m_k4); 58 addToPropertyMap(m_k4);
59 addToPropertyMap(m_in1); 59 addToPropertyMap(m_in1);
60 addToPropertyMap(m_in2); 60 addToPropertyMap(m_in2);
61 addToPropertyMap(m_svgOperator); 61 addToPropertyMap(m_svgOperator);
62 } 62 }
63 63
64 void SVGFECompositeElement::trace(Visitor* visitor)
65 {
66 visitor->trace(m_k1);
67 visitor->trace(m_k2);
68 visitor->trace(m_k3);
69 visitor->trace(m_k4);
70 visitor->trace(m_in1);
71 visitor->trace(m_in2);
72 visitor->trace(m_svgOperator);
73 SVGFilterPrimitiveStandardAttributes::trace(visitor);
74 }
75
64 DEFINE_NODE_FACTORY(SVGFECompositeElement) 76 DEFINE_NODE_FACTORY(SVGFECompositeElement)
65 77
66 bool SVGFECompositeElement::isSupportedAttribute(const QualifiedName& attrName) 78 bool SVGFECompositeElement::isSupportedAttribute(const QualifiedName& attrName)
67 { 79 {
68 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); 80 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ());
69 if (supportedAttributes.isEmpty()) { 81 if (supportedAttributes.isEmpty()) {
70 supportedAttributes.add(SVGNames::inAttr); 82 supportedAttributes.add(SVGNames::inAttr);
71 supportedAttributes.add(SVGNames::in2Attr); 83 supportedAttributes.add(SVGNames::in2Attr);
72 supportedAttributes.add(SVGNames::operatorAttr); 84 supportedAttributes.add(SVGNames::operatorAttr);
73 supportedAttributes.add(SVGNames::k1Attr); 85 supportedAttributes.add(SVGNames::k1Attr);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 133 }
122 134
123 if (attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr) { 135 if (attrName == SVGNames::inAttr || attrName == SVGNames::in2Attr) {
124 invalidate(); 136 invalidate();
125 return; 137 return;
126 } 138 }
127 139
128 ASSERT_NOT_REACHED(); 140 ASSERT_NOT_REACHED();
129 } 141 }
130 142
131 PassRefPtr<FilterEffect> SVGFECompositeElement::build(SVGFilterBuilder* filterBu ilder, Filter* filter) 143 PassRefPtrWillBeRawPtr<FilterEffect> SVGFECompositeElement::build(SVGFilterBuild er* filterBuilder, Filter* filter)
132 { 144 {
133 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->curr entValue()->value())); 145 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->curr entValue()->value()));
134 FilterEffect* input2 = filterBuilder->getEffectById(AtomicString(m_in2->curr entValue()->value())); 146 FilterEffect* input2 = filterBuilder->getEffectById(AtomicString(m_in2->curr entValue()->value()));
135 147
136 if (!input1 || !input2) 148 if (!input1 || !input2)
137 return nullptr; 149 return nullptr;
138 150
139 RefPtr<FilterEffect> effect = FEComposite::create(filter, m_svgOperator->cur rentValue()->enumValue(), m_k1->currentValue()->value(), m_k2->currentValue()->v alue(), m_k3->currentValue()->value(), m_k4->currentValue()->value()); 151 RefPtrWillBeRawPtr<FilterEffect> effect = FEComposite::create(filter, m_svgO perator->currentValue()->enumValue(), m_k1->currentValue()->value(), m_k2->curre ntValue()->value(), m_k3->currentValue()->value(), m_k4->currentValue()->value() );
140 FilterEffectVector& inputEffects = effect->inputEffects(); 152 FilterEffectVector& inputEffects = effect->inputEffects();
141 inputEffects.reserveCapacity(2); 153 inputEffects.reserveCapacity(2);
142 inputEffects.append(input1); 154 inputEffects.append(input1);
143 inputEffects.append(input2); 155 inputEffects.append(input2);
144 return effect.release(); 156 return effect.release();
145 } 157 }
146 158
147 } // namespace blink 159 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFECompositeElement.h ('k') | Source/core/svg/SVGFEConvolveMatrixElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698