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

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: 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 14 matching lines...) Expand all
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 33 // Animated property definitions
34 34
35 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEDiffuseLightingElement)
36 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes)
37 END_REGISTER_ANIMATED_PROPERTIES
38 35
39 inline SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement(Document& docume nt) 36 inline SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement(Document& docume nt)
40 : SVGFilterPrimitiveStandardAttributes(SVGNames::feDiffuseLightingTag, docum ent) 37 : SVGFilterPrimitiveStandardAttributes(SVGNames::feDiffuseLightingTag, docum ent)
41 , m_diffuseConstant(SVGAnimatedNumber::create(this, SVGNames::diffuseConstan tAttr, SVGNumber::create(1))) 38 , m_diffuseConstant(SVGAnimatedNumber::create(this, SVGNames::diffuseConstan tAttr, SVGNumber::create(1)))
42 , m_surfaceScale(SVGAnimatedNumber::create(this, SVGNames::surfaceScaleAttr, SVGNumber::create(1))) 39 , m_surfaceScale(SVGAnimatedNumber::create(this, SVGNames::surfaceScaleAttr, SVGNumber::create(1)))
43 , m_kernelUnitLength(SVGAnimatedNumberOptionalNumber::create(this, SVGNames: :kernelUnitLengthAttr)) 40 , m_kernelUnitLength(SVGAnimatedNumberOptionalNumber::create(this, SVGNames: :kernelUnitLengthAttr))
44 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create( ))) 41 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create( )))
45 { 42 {
46 ScriptWrappable::init(this); 43 ScriptWrappable::init(this);
47 44
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 ASSERT(renderer->style()); 186 ASSERT(renderer->style());
190 Color color = renderer->style()->svgStyle()->lightingColor(); 187 Color color = renderer->style()->svgStyle()->lightingColor();
191 188
192 RefPtr<FilterEffect> effect = FEDiffuseLighting::create(filter, color, m_sur faceScale->currentValue()->value(), m_diffuseConstant->currentValue()->value(), 189 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()); 190 kernelUnitLengthX()->currentValue()->value(), kernelUnitLengthY()->curre ntValue()->value(), lightSource.release());
194 effect->inputEffects().append(input1); 191 effect->inputEffects().append(input1);
195 return effect.release(); 192 return effect.release();
196 } 193 }
197 194
198 } 195 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698