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

Unified Diff: Source/core/svg/SVGFESpotLightElement.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/SVGFESpotLightElement.cpp
diff --git a/Source/core/svg/SVGFESpotLightElement.cpp b/Source/core/svg/SVGFESpotLightElement.cpp
index e6c8deb1779f4950e000b7d7563bc802929498fa..8d1d081fbae46871245c0e0702651a91fdff8677 100644
--- a/Source/core/svg/SVGFESpotLightElement.cpp
+++ b/Source/core/svg/SVGFESpotLightElement.cpp
@@ -21,6 +21,7 @@
#include "core/svg/SVGFESpotLightElement.h"
#include "core/SVGNames.h"
+#include "platform/graphics/filters/Filter.h"
#include "platform/graphics/filters/SpotLightSource.h"
namespace WebCore {
@@ -33,12 +34,12 @@ inline SVGFESpotLightElement::SVGFESpotLightElement(Document& document)
DEFINE_NODE_FACTORY(SVGFESpotLightElement)
-PassRefPtr<LightSource> SVGFESpotLightElement::lightSource() const
+PassRefPtr<LightSource> SVGFESpotLightElement::lightSource(Filter* filter) const
{
FloatPoint3D pos(x()->currentValue()->value(), y()->currentValue()->value(), z()->currentValue()->value());
FloatPoint3D direction(pointsAtX()->currentValue()->value(), pointsAtY()->currentValue()->value(), pointsAtZ()->currentValue()->value());
- return SpotLightSource::create(pos, direction, specularExponent()->currentValue()->value(), limitingConeAngle()->currentValue()->value());
+ return SpotLightSource::create(filter->resolve3dPoint(pos), filter->resolve3dPoint(direction), specularExponent()->currentValue()->value(), limitingConeAngle()->currentValue()->value());
}
}

Powered by Google App Engine
This is Rietveld 408576698