diff options
author | Chris Craik <ccraik@google.com> | 2014-03-26 13:19:14 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2014-03-27 16:01:04 -0700 |
commit | 024433f89684e1f9cb7b15ade7c480c9346fbe4d (patch) | |
tree | 981c0a0fdaa0b70be66899855806c1ce879b579e /libs/hwui/RenderNode.cpp | |
parent | 1dd9c53a40b7c147767c63e10a47eb5cb6f8e197 (diff) | |
download | frameworks_base-024433f89684e1f9cb7b15ade7c480c9346fbe4d.zip frameworks_base-024433f89684e1f9cb7b15ade7c480c9346fbe4d.tar.gz frameworks_base-024433f89684e1f9cb7b15ade7c480c9346fbe4d.tar.bz2 |
Disable shadow overdraw avoidance in the inverse clip case
The caster is effectivly transparent, so skip the optimization just as
is done for alpha < 1.0
Change-Id: I3d294222adf0137e20c1fb5808313d487e92e0a8
Diffstat (limited to 'libs/hwui/RenderNode.cpp')
-rw-r--r-- | libs/hwui/RenderNode.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index e39e5ae..c24a7a1 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -416,8 +416,17 @@ void RenderNode::iterate3dChildren(const Vector<ZDrawDisplayListOpPair>& zTransl const SkPath* revealClipPath = revealClip.hasConvexClip() ? revealClip.getPath() : NULL; // only pass the reveal clip's path if it's convex + /** + * The drawing area of the caster is always the same as the its perimeter (which + * the shadow system uses) *except* in the inverse clip case. Inform the shadow + * system that the caster's drawing area (as opposed to its perimeter) has been + * clipped, so that it knows the caster can't be opaque. + */ + bool casterUnclipped = !revealClip.willClip() || revealClip.hasConvexClip(); + DisplayListOp* shadowOp = new (alloc) DrawShadowOp( - shadowMatrixXY, shadowMatrixZ, caster->properties().getAlpha(), + shadowMatrixXY, shadowMatrixZ, + caster->properties().getAlpha(), casterUnclipped, caster->properties().getWidth(), caster->properties().getHeight(), outlinePath, revealClipPath); handler(shadowOp, PROPERTY_SAVECOUNT, properties().getClipToBounds()); |