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

Unified Diff: Source/platform/graphics/filters/PointLightSource.h

Issue 181943003: Scaling and offset fix for FELighting (software and skia paths) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changed fix to temporary light creation Created 6 years, 10 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.h
diff --git a/Source/platform/graphics/filters/PointLightSource.h b/Source/platform/graphics/filters/PointLightSource.h
index b9b5e1e6ebba3464c80bce9bd339e6560f4225d4..112f0168e7a2095165e08c138f72983072394d36 100644
--- a/Source/platform/graphics/filters/PointLightSource.h
+++ b/Source/platform/graphics/filters/PointLightSource.h
@@ -34,13 +34,19 @@ public:
return adoptRef(new PointLightSource(position));
}
+ virtual PassRefPtr<LightSource> create(const FloatPoint3D& scale, const FloatSize& offset) const OVERRIDE
+ {
+ FloatPoint3D position(m_position.x() * scale.x() - offset.width(), m_position.y() * scale.y() - offset.height(), m_position.z() * scale.z());
+ return adoptRef(new PointLightSource(position));
+ }
+
const FloatPoint3D& position() const { return m_position; }
virtual bool setX(float) OVERRIDE;
virtual bool setY(float) OVERRIDE;
virtual bool setZ(float) OVERRIDE;
- virtual void initPaintingData(PaintingData&) OVERRIDE;
- virtual void updatePaintingData(PaintingData&, int x, int y, float z) OVERRIDE;
+ virtual void initPaintingData(PaintingData&) const OVERRIDE;
+ virtual void updatePaintingData(PaintingData&, int x, int y, float z) const OVERRIDE;
virtual TextStream& externalRepresentation(TextStream&) const OVERRIDE;
« no previous file with comments | « Source/platform/graphics/filters/LightSource.h ('k') | Source/platform/graphics/filters/PointLightSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698