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/Snapshot.h b/libs/hwui/Snapshot.h
index 98e2440..ad4ee9d 100644
--- a/libs/hwui/Snapshot.h
+++ b/libs/hwui/Snapshot.h
@@ -161,6 +161,9 @@
     int getViewportHeight() const { return mViewportData.mHeight; }
     const Matrix4& getOrthoMatrix() const { return mViewportData.mOrthoMatrix; }
 
+    const Vector3& getRelativeLightCenter() const { return mRelativeLightCenter; }
+    void setRelativeLightCenter(const Vector3& lightCenter) { mRelativeLightCenter = lightCenter; }
+
     /**
      * Sets (and replaces) the current clipping outline
      */
@@ -302,6 +305,7 @@
 
     SkRegion mClipRegionRoot;
     ViewportData mViewportData;
+    Vector3 mRelativeLightCenter;
 
 }; // class Snapshot