From 2168e2de244500d912dbeb43ac4065c327baddf5 Mon Sep 17 00:00:00 2001 From: Ichitaro Kohara Date: Thu, 17 Feb 2011 12:31:23 +0100 Subject: [PATCH] Fixed to call computeVisibleRegions() when transparent value changed When some Surfaces are overlapping and one of them changed to transparent or opaque, the back Surfaces should appear or disappear. This patch calls SurfaceFlinger::computeVisibleRegions() to re-calculate region of each Surface to implement the behavior. Change-Id: Iffb1caf1b4ce28dff252e114fe5b9b07d9c84a6f --- services/surfaceflinger/LayerBuffer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/surfaceflinger/LayerBuffer.cpp b/services/surfaceflinger/LayerBuffer.cpp index 23506cfbc..55d859dc1 100644 --- a/services/surfaceflinger/LayerBuffer.cpp +++ b/services/surfaceflinger/LayerBuffer.cpp @@ -93,6 +93,9 @@ bool LayerBuffer::needsBlending() const { } void LayerBuffer::setNeedsBlending(bool blending) { + if (mNeedsBlending != blending) { + mFlinger->invalidateLayerVisibility(this); + } mNeedsBlending = blending; }