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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGFESpecularLightingElement.cpp

Issue 2128193004: Update FilterEffect colorspace on color-interpolation-filters changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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 * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com> 4 * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com>
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 return lightSource->setElevation(lightElement->elevation()->currentValue ()->value()); 85 return lightSource->setElevation(lightElement->elevation()->currentValue ()->value());
86 if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || attrName = = SVGNames::zAttr) 86 if (attrName == SVGNames::xAttr || attrName == SVGNames::yAttr || attrName = = SVGNames::zAttr)
87 return lightSource->setPosition(effect->getFilter()->resolve3dPoint(ligh tElement->position())); 87 return lightSource->setPosition(effect->getFilter()->resolve3dPoint(ligh tElement->position()));
88 if (attrName == SVGNames::pointsAtXAttr || attrName == SVGNames::pointsAtYAt tr || attrName == SVGNames::pointsAtZAttr) 88 if (attrName == SVGNames::pointsAtXAttr || attrName == SVGNames::pointsAtYAt tr || attrName == SVGNames::pointsAtZAttr)
89 return lightSource->setPointsAt(effect->getFilter()->resolve3dPoint(ligh tElement->pointsAt())); 89 return lightSource->setPointsAt(effect->getFilter()->resolve3dPoint(ligh tElement->pointsAt()));
90 if (attrName == SVGNames::specularExponentAttr) 90 if (attrName == SVGNames::specularExponentAttr)
91 return lightSource->setSpecularExponent(lightElement->specularExponent() ->currentValue()->value()); 91 return lightSource->setSpecularExponent(lightElement->specularExponent() ->currentValue()->value());
92 if (attrName == SVGNames::limitingConeAngleAttr) 92 if (attrName == SVGNames::limitingConeAngleAttr)
93 return lightSource->setLimitingConeAngle(lightElement->limitingConeAngle ()->currentValue()->value()); 93 return lightSource->setLimitingConeAngle(lightElement->limitingConeAngle ()->currentValue()->value());
94 94
95 ASSERT_NOT_REACHED(); 95 return SVGFilterPrimitiveStandardAttributes::setFilterEffectAttribute(effect , attrName);
96 return false;
97 } 96 }
98 97
99 void SVGFESpecularLightingElement::svgAttributeChanged(const QualifiedName& attr Name) 98 void SVGFESpecularLightingElement::svgAttributeChanged(const QualifiedName& attr Name)
100 { 99 {
101 if (attrName == SVGNames::surfaceScaleAttr 100 if (attrName == SVGNames::surfaceScaleAttr
102 || attrName == SVGNames::specularConstantAttr 101 || attrName == SVGNames::specularConstantAttr
103 || attrName == SVGNames::specularExponentAttr) { 102 || attrName == SVGNames::specularExponentAttr) {
104 SVGElement::InvalidationGuard invalidationGuard(this); 103 SVGElement::InvalidationGuard invalidationGuard(this);
105 primitiveAttributeChanged(attrName); 104 primitiveAttributeChanged(attrName);
106 return; 105 return;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 color, 142 color,
144 m_surfaceScale->currentValue()->value(), 143 m_surfaceScale->currentValue()->value(),
145 m_specularConstant->currentValue()->value(), 144 m_specularConstant->currentValue()->value(),
146 m_specularExponent->currentValue()->value(), 145 m_specularExponent->currentValue()->value(),
147 lightSource.release()); 146 lightSource.release());
148 effect->inputEffects().append(input1); 147 effect->inputEffects().append(input1);
149 return effect; 148 return effect;
150 } 149 }
151 150
152 } // namespace blink 151 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698