diff options
Diffstat (limited to 'libs/hwui/RenderNode.cpp')
-rw-r--r-- | libs/hwui/RenderNode.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index 0662ca2..fa1b21d 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -594,7 +594,12 @@ void RenderNode::buildZSortedChildList(Vector<ZDrawRenderNodeOpPair>& zTranslate template <class T> void RenderNode::issueDrawShadowOperation(const Matrix4& transformFromParent, T& handler) { - if (properties().getAlpha() <= 0.0f || !properties().getOutline().getPath()) return; + if (properties().getAlpha() <= 0.0f + || properties().getOutline().getAlpha() <= 0.0f + || !properties().getOutline().getPath()) { + // no shadow to draw + return; + } mat4 shadowMatrixXY(transformFromParent); applyViewPropertyTransforms(shadowMatrixXY); @@ -607,8 +612,9 @@ void RenderNode::issueDrawShadowOperation(const Matrix4& transformFromParent, T& const SkPath* revealClipPath = properties().getRevealClip().getPath(); if (revealClipPath && revealClipPath->isEmpty()) return; + float casterAlpha = properties().getAlpha() * properties().getOutline().getAlpha(); DisplayListOp* shadowOp = new (handler.allocator()) DrawShadowOp( - shadowMatrixXY, shadowMatrixZ, properties().getAlpha(), + shadowMatrixXY, shadowMatrixZ, casterAlpha, outlinePath, revealClipPath); handler(shadowOp, PROPERTY_SAVECOUNT, properties().getClipToBounds()); } |