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

Unified Diff: Source/core/svg/SVGFEDiffuseLightingElement.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/SVGFEDiffuseLightingElement.cpp
diff --git a/Source/core/svg/SVGFEDiffuseLightingElement.cpp b/Source/core/svg/SVGFEDiffuseLightingElement.cpp
index 7b63d95540172295a102b6c86fd3aa235c0b6093..d2aa04c3e5211d994375eefe5e65749d767d9b5d 100644
--- a/Source/core/svg/SVGFEDiffuseLightingElement.cpp
+++ b/Source/core/svg/SVGFEDiffuseLightingElement.cpp
@@ -168,8 +168,8 @@ PassRefPtr<FilterEffect> SVGFEDiffuseLightingElement::build(SVGFilterBuilder* fi
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();
@@ -179,6 +179,7 @@ PassRefPtr<FilterEffect> SVGFEDiffuseLightingElement::build(SVGFilterBuilder* fi
ASSERT(renderer->style());
Color color = renderer->style()->svgStyle()->lightingColor();
+ RefPtr<LightSource> lightSource = lightNode->lightSource(filter);
RefPtr<FilterEffect> effect = FEDiffuseLighting::create(filter, color, m_surfaceScale->currentValue()->value(), m_diffuseConstant->currentValue()->value(),
kernelUnitLengthX()->currentValue()->value(), kernelUnitLengthY()->currentValue()->value(), lightSource.release());
effect->inputEffects().append(input1);

Powered by Google App Engine
This is Rietveld 408576698