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

Unified Diff: Source/core/svg/SVGFESpecularLightingElement.cpp

Issue 337903003: Map light-source oBB-relative coordinates to the user-space of the filter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/svg/SVGFESpecularLightingElement.cpp
diff --git a/Source/core/svg/SVGFESpecularLightingElement.cpp b/Source/core/svg/SVGFESpecularLightingElement.cpp
index 422b6a4cb8ac3358d5ae2d39397eae45b3be57f5..2781bd5eadb9ed3106cbffee1ed62b66db40dc45 100644
--- a/Source/core/svg/SVGFESpecularLightingElement.cpp
+++ b/Source/core/svg/SVGFESpecularLightingElement.cpp
@@ -175,8 +175,8 @@ PassRefPtr<FilterEffect> SVGFESpecularLightingElement::build(SVGFilterBuilder* f
if (!input1)
return nullptr;
- RefPtr<LightSource> lightSource = SVGFELightElement::findLightSource(*this);
- if (!lightSource)
+ SVGFELightElement* lightNode = SVGFELightElement::findLightElement(*this);
+ if (!lightNode)
return nullptr;
RenderObject* renderer = this->renderer();
@@ -186,6 +186,7 @@ PassRefPtr<FilterEffect> SVGFESpecularLightingElement::build(SVGFilterBuilder* f
ASSERT(renderer->style());
Color color = renderer->style()->svgStyle()->lightingColor();
+ RefPtr<LightSource> lightSource = lightNode->lightSource(filter);
RefPtr<FilterEffect> effect = FESpecularLighting::create(filter, color, m_surfaceScale->currentValue()->value(), m_specularConstant->currentValue()->value(),
m_specularExponent->currentValue()->value(), kernelUnitLengthX()->currentValue()->value(), kernelUnitLengthY()->currentValue()->value(), lightSource.release());
effect->inputEffects().append(input1);

Powered by Google App Engine
This is Rietveld 408576698