Adjust light source for window position
Bug: 16523629
Change-Id: I2f3fed1edcac0a3cfd5034aded45e08ececfebaf
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 6d7dcf1..8329cd4 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -127,10 +127,15 @@
}
// TODO: don't pass viewport size, it's automatic via EGL
-void CanvasContext::setup(int width, int height, const Vector3& lightCenter, float lightRadius,
+void CanvasContext::setup(int width, int height, float lightRadius,
uint8_t ambientShadowAlpha, uint8_t spotShadowAlpha) {
if (!mCanvas) return;
- mCanvas->initLight(lightCenter, lightRadius, ambientShadowAlpha, spotShadowAlpha);
+ mCanvas->initLight(lightRadius, ambientShadowAlpha, spotShadowAlpha);
+}
+
+void CanvasContext::setLightCenter(const Vector3& lightCenter) {
+ if (!mCanvas) return;
+ mCanvas->setLightCenter(lightCenter);
}
void CanvasContext::setOpaque(bool opaque) {