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

Unified Diff: Source/platform/graphics/filters/SpotLightSource.cpp

Issue 395813002: Resolve light-source position/direction when updated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/graphics/filters/SpotLightSource.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/filters/SpotLightSource.cpp
diff --git a/Source/platform/graphics/filters/SpotLightSource.cpp b/Source/platform/graphics/filters/SpotLightSource.cpp
index aec1320062ff34b7b11788bc8a6a93f7002f2b99..c74bf00f989bc6f7716405509c47f366366ec8f0 100644
--- a/Source/platform/graphics/filters/SpotLightSource.cpp
+++ b/Source/platform/graphics/filters/SpotLightSource.cpp
@@ -97,51 +97,19 @@ void SpotLightSource::updatePaintingData(PaintingData& paintingData, int x, int
paintingData.colorVector.setZ(paintingData.privateColorVector.z() * lightStrength);
}
-bool SpotLightSource::setX(float x)
+bool SpotLightSource::setPosition(const FloatPoint3D& position)
{
- if (m_position.x() == x)
+ if (m_position == position)
return false;
- m_position.setX(x);
+ m_position = position;
return true;
}
-bool SpotLightSource::setY(float y)
+bool SpotLightSource::setPointsAt(const FloatPoint3D& direction)
{
- if (m_position.y() == y)
+ if (m_direction == direction)
return false;
- m_position.setY(y);
- return true;
-}
-
-bool SpotLightSource::setZ(float z)
-{
- if (m_position.z() == z)
- return false;
- m_position.setZ(z);
- return true;
-}
-
-bool SpotLightSource::setPointsAtX(float pointsAtX)
-{
- if (m_direction.x() == pointsAtX)
- return false;
- m_direction.setX(pointsAtX);
- return true;
-}
-
-bool SpotLightSource::setPointsAtY(float pointsAtY)
-{
- if (m_direction.y() == pointsAtY)
- return false;
- m_direction.setY(pointsAtY);
- return true;
-}
-
-bool SpotLightSource::setPointsAtZ(float pointsAtZ)
-{
- if (m_direction.z() == pointsAtZ)
- return false;
- m_direction.setZ(pointsAtZ);
+ m_direction = direction;
return true;
}
« no previous file with comments | « Source/platform/graphics/filters/SpotLightSource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698