From ce9f308063cc2bc7851f3f58c881da8a7271eecc Mon Sep 17 00:00:00 2001 From: John Reck Date: Tue, 17 Jun 2014 16:18:09 -0700 Subject: Fix dirty calculation for layer updates Bug: 15682142 Defer early return of alpha <= 0 for damage accumulation until popTransform() so that layer updates will be performed regardless of alpha Change-Id: Ifb94dd3ed2d96d610e6f2f3071933903016273a5 --- libs/hwui/DamageAccumulator.cpp | 3 +++ libs/hwui/RenderNode.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/hwui/DamageAccumulator.cpp b/libs/hwui/DamageAccumulator.cpp index 77d16ab8d452..8b32c40600eb 100644 --- a/libs/hwui/DamageAccumulator.cpp +++ b/libs/hwui/DamageAccumulator.cpp @@ -170,6 +170,9 @@ void DamageAccumulator::applyRenderNodeTransform(DirtyStack* frame) { } const RenderProperties& props = frame->renderNode->properties(); + if (props.getAlpha() <= 0) { + return; + } // Perform clipping if (props.getClipDamageToBounds() && !frame->pendingDirty.isEmpty()) { diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp index fc51170cced6..05f4edf6e75e 100644 --- a/libs/hwui/RenderNode.cpp +++ b/libs/hwui/RenderNode.cpp @@ -117,7 +117,7 @@ void RenderNode::prepareTree(TreeInfo& info) { } void RenderNode::damageSelf(TreeInfo& info) { - if (isRenderable() && properties().getAlpha() > 0) { + if (isRenderable()) { if (properties().getClipDamageToBounds()) { info.damageAccumulator->dirty(0, 0, properties().getWidth(), properties().getHeight()); } else { -- cgit v1.2.3-59-g8ed1b