diff options
author | 2014-08-14 13:34:01 -0700 | |
---|---|---|
committer | 2014-08-15 00:59:44 +0000 | |
commit | 69e5adffb19135d51bde8e458f4907d7265f3e23 (patch) | |
tree | 022fc23512ae5adfbe3f86351305bc9f4538a68a /libs/hwui/StatefulBaseRenderer.cpp | |
parent | e222e359a0aab985488a711f6edb76820fe8c6df (diff) |
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
Diffstat (limited to 'libs/hwui/StatefulBaseRenderer.cpp')
-rw-r--r-- | libs/hwui/StatefulBaseRenderer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/hwui/StatefulBaseRenderer.cpp b/libs/hwui/StatefulBaseRenderer.cpp index dc41157d5778..06c5ab42592a 100644 --- a/libs/hwui/StatefulBaseRenderer.cpp +++ b/libs/hwui/StatefulBaseRenderer.cpp @@ -35,11 +35,12 @@ StatefulBaseRenderer::StatefulBaseRenderer() } void StatefulBaseRenderer::initializeSaveStack(float clipLeft, float clipTop, - float clipRight, float clipBottom) { + float clipRight, float clipBottom, const Vector3& lightCenter) { mSnapshot = new Snapshot(mFirstSnapshot, SkCanvas::kMatrix_SaveFlag | SkCanvas::kClip_SaveFlag); mSnapshot->setClip(clipLeft, clipTop, clipRight, clipBottom); mSnapshot->fbo = getTargetFbo(); + mSnapshot->setRelativeLightCenter(lightCenter); mSaveCount = 1; } |