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

Side by Side Diff: Source/core/svg/SVGFEGaussianBlurElement.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/SVGFEGaussianBlurElement.h ('k') | Source/core/svg/SVGFEImageElement.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 20 matching lines...) Expand all
31 31
32 inline SVGFEGaussianBlurElement::SVGFEGaussianBlurElement(Document& document) 32 inline SVGFEGaussianBlurElement::SVGFEGaussianBlurElement(Document& document)
33 : SVGFilterPrimitiveStandardAttributes(SVGNames::feGaussianBlurTag, document ) 33 : SVGFilterPrimitiveStandardAttributes(SVGNames::feGaussianBlurTag, document )
34 , m_stdDeviation(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::std DeviationAttr, 0, 0)) 34 , m_stdDeviation(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::std DeviationAttr, 0, 0))
35 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create( ))) 35 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create( )))
36 { 36 {
37 addToPropertyMap(m_stdDeviation); 37 addToPropertyMap(m_stdDeviation);
38 addToPropertyMap(m_in1); 38 addToPropertyMap(m_in1);
39 } 39 }
40 40
41 void SVGFEGaussianBlurElement::trace(Visitor* visitor)
42 {
43 visitor->trace(m_stdDeviation);
44 visitor->trace(m_in1);
45 SVGFilterPrimitiveStandardAttributes::trace(visitor);
46 }
47
41 DEFINE_NODE_FACTORY(SVGFEGaussianBlurElement) 48 DEFINE_NODE_FACTORY(SVGFEGaussianBlurElement)
42 49
43 void SVGFEGaussianBlurElement::setStdDeviation(float x, float y) 50 void SVGFEGaussianBlurElement::setStdDeviation(float x, float y)
44 { 51 {
45 stdDeviationX()->baseValue()->setValue(x); 52 stdDeviationX()->baseValue()->setValue(x);
46 stdDeviationY()->baseValue()->setValue(y); 53 stdDeviationY()->baseValue()->setValue(y);
47 invalidate(); 54 invalidate();
48 } 55 }
49 56
50 bool SVGFEGaussianBlurElement::isSupportedAttribute(const QualifiedName& attrNam e) 57 bool SVGFEGaussianBlurElement::isSupportedAttribute(const QualifiedName& attrNam e)
(...skipping 21 matching lines...) Expand all
72 SVGElement::InvalidationGuard invalidationGuard(this); 79 SVGElement::InvalidationGuard invalidationGuard(this);
73 80
74 if (attrName == SVGNames::inAttr || attrName == SVGNames::stdDeviationAttr) { 81 if (attrName == SVGNames::inAttr || attrName == SVGNames::stdDeviationAttr) {
75 invalidate(); 82 invalidate();
76 return; 83 return;
77 } 84 }
78 85
79 ASSERT_NOT_REACHED(); 86 ASSERT_NOT_REACHED();
80 } 87 }
81 88
82 PassRefPtr<FilterEffect> SVGFEGaussianBlurElement::build(SVGFilterBuilder* filte rBuilder, Filter* filter) 89 PassRefPtrWillBeRawPtr<FilterEffect> SVGFEGaussianBlurElement::build(SVGFilterBu ilder* filterBuilder, Filter* filter)
83 { 90 {
84 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->curr entValue()->value())); 91 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->curr entValue()->value()));
85 92
86 if (!input1) 93 if (!input1)
87 return nullptr; 94 return nullptr;
88 95
89 if (stdDeviationX()->currentValue()->value() < 0 || stdDeviationY()->current Value()->value() < 0) 96 if (stdDeviationX()->currentValue()->value() < 0 || stdDeviationY()->current Value()->value() < 0)
90 return nullptr; 97 return nullptr;
91 98
92 RefPtr<FilterEffect> effect = FEGaussianBlur::create(filter, stdDeviationX() ->currentValue()->value(), stdDeviationY()->currentValue()->value()); 99 RefPtrWillBeRawPtr<FilterEffect> effect = FEGaussianBlur::create(filter, std DeviationX()->currentValue()->value(), stdDeviationY()->currentValue()->value()) ;
93 effect->inputEffects().append(input1); 100 effect->inputEffects().append(input1);
94 return effect.release(); 101 return effect.release();
95 } 102 }
96 103
97 } // namespace blink 104 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFEGaussianBlurElement.h ('k') | Source/core/svg/SVGFEImageElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698