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

Unified Diff: Source/platform/graphics/filters/PointLightSource.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
Index: Source/platform/graphics/filters/PointLightSource.cpp
diff --git a/Source/platform/graphics/filters/PointLightSource.cpp b/Source/platform/graphics/filters/PointLightSource.cpp
index 5acacbc43c46069bb2b9f83bdc78624d7393f82b..acea84064f9d5d494caddcfebf47eb5d2cea043a 100644
--- a/Source/platform/graphics/filters/PointLightSource.cpp
+++ b/Source/platform/graphics/filters/PointLightSource.cpp
@@ -47,27 +47,11 @@ void PointLightSource::updatePaintingData(PaintingData& paintingData, int x, int
paintingData.lightVectorLength = paintingData.lightVector.length();
}
-bool PointLightSource::setX(float x)
+bool PointLightSource::setPosition(const FloatPoint3D& position)
{
- if (m_position.x() == x)
+ if (m_position == position)
return false;
- m_position.setX(x);
- return true;
-}
-
-bool PointLightSource::setY(float y)
-{
- if (m_position.y() == y)
- return false;
- m_position.setY(y);
- return true;
-}
-
-bool PointLightSource::setZ(float z)
-{
- if (m_position.z() == z)
- return false;
- m_position.setZ(z);
+ m_position = position;
return true;
}
« no previous file with comments | « Source/platform/graphics/filters/PointLightSource.h ('k') | Source/platform/graphics/filters/SpotLightSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698