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

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

Issue 177703004: [SVG] Remove SVGAnimatedPropertyMacros.h (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove ws Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005 Oliver Hunt <ojh16@student.canterbury.ac.nz> 2 * Copyright (C) 2005 Oliver Hunt <ojh16@student.canterbury.ac.nz>
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 12 matching lines...) Expand all
23 23
24 #include "core/rendering/style/RenderStyle.h" 24 #include "core/rendering/style/RenderStyle.h"
25 #include "core/svg/SVGElementInstance.h" 25 #include "core/svg/SVGElementInstance.h"
26 #include "core/svg/SVGParserUtilities.h" 26 #include "core/svg/SVGParserUtilities.h"
27 #include "core/svg/graphics/filters/SVGFilterBuilder.h" 27 #include "core/svg/graphics/filters/SVGFilterBuilder.h"
28 #include "platform/graphics/filters/FEDiffuseLighting.h" 28 #include "platform/graphics/filters/FEDiffuseLighting.h"
29 #include "platform/graphics/filters/FilterEffect.h" 29 #include "platform/graphics/filters/FilterEffect.h"
30 30
31 namespace WebCore { 31 namespace WebCore {
32 32
33 // Animated property definitions
34
35 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEDiffuseLightingElement)
36 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
37 END_REGISTER_ANIMATED_PROPERTIES
38
39 inline SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement(Document& docume nt) 33 inline SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement(Document& docume nt)
40 : SVGFilterPrimitiveStandardAttributes(SVGNames::feDiffuseLightingTag, docum ent) 34 : SVGFilterPrimitiveStandardAttributes(SVGNames::feDiffuseLightingTag, docum ent)
41 , m_diffuseConstant(SVGAnimatedNumber::create(this, SVGNames::diffuseConstan tAttr, SVGNumber::create(1))) 35 , m_diffuseConstant(SVGAnimatedNumber::create(this, SVGNames::diffuseConstan tAttr, SVGNumber::create(1)))
42 , m_surfaceScale(SVGAnimatedNumber::create(this, SVGNames::surfaceScaleAttr, SVGNumber::create(1))) 36 , m_surfaceScale(SVGAnimatedNumber::create(this, SVGNames::surfaceScaleAttr, SVGNumber::create(1)))
43 , m_kernelUnitLength(SVGAnimatedNumberOptionalNumber::create(this, SVGNames: :kernelUnitLengthAttr)) 37 , m_kernelUnitLength(SVGAnimatedNumberOptionalNumber::create(this, SVGNames: :kernelUnitLengthAttr))
44 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create( ))) 38 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create( )))
45 { 39 {
46 ScriptWrappable::init(this); 40 ScriptWrappable::init(this);
47 41
48 addToPropertyMap(m_diffuseConstant); 42 addToPropertyMap(m_diffuseConstant);
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 ASSERT(renderer->style()); 183 ASSERT(renderer->style());
190 Color color = renderer->style()->svgStyle()->lightingColor(); 184 Color color = renderer->style()->svgStyle()->lightingColor();
191 185
192 RefPtr<FilterEffect> effect = FEDiffuseLighting::create(filter, color, m_sur faceScale->currentValue()->value(), m_diffuseConstant->currentValue()->value(), 186 RefPtr<FilterEffect> effect = FEDiffuseLighting::create(filter, color, m_sur faceScale->currentValue()->value(), m_diffuseConstant->currentValue()->value(),
193 kernelUnitLengthX()->currentValue()->value(), kernelUnitLengthY()->curre ntValue()->value(), lightSource.release()); 187 kernelUnitLengthX()->currentValue()->value(), kernelUnitLengthY()->curre ntValue()->value(), lightSource.release());
194 effect->inputEffects().append(input1); 188 effect->inputEffects().append(input1);
195 return effect.release(); 189 return effect.release();
196 } 190 }
197 191
198 } 192 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFEDiffuseLightingElement.h ('k') | Source/core/svg/SVGFEDisplacementMapElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698