Define shadow casting behavior within layers
bug:15860114
Savelayers and HW layers both now support shadow casting.
For save layers, the light source should always be correct, for HW
layers, the light source position is set when the layer is created,
and updated when it is resized.
Change-Id: Ie85567dd43c2bb0a0b08fd0bd4db41efa793ac2b
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index fc95c18..e9ca5d9 100755
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -345,8 +345,10 @@
}
#endif
- const Vector3& getLightCenter() const { return mLightCenter; }
+ const Vector3& getLightCenter() const { return currentSnapshot()->getRelativeLightCenter(); }
float getLightRadius() const { return mLightRadius; }
+ uint8_t getAmbientShadowAlpha() const { return mAmbientShadowAlpha; }
+ uint8_t getSpotShadowAlpha() const { return mSpotShadowAlpha; }
protected:
/**