Set visible region dirty flag when alpha changes
Removes an optimzation which only set the
visible region dirty flag when alpha changed
from 1->0 or 0->1. This optimization broke an
assumption in CE. Alpha is only passed to HWC
when there are geometry changes which are
tracked by the visible region dirty flag.
Fixes: 299256533
Test: presubmit
Test: dim layer alpha animates when showing a dialog
Change-Id: I4c56171d19d582e26b9c2c7be6c555a6c1d7494c
diff --git a/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp b/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp
index 168267b..f137ec4 100644
--- a/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp
+++ b/services/surfaceflinger/FrontEnd/RequestedLayerState.cpp
@@ -237,8 +237,7 @@
}
if (what & (layer_state_t::eAlphaChanged)) {
if (oldAlpha == 0 || color.a == 0) {
- changes |= RequestedLayerState::Changes::Visibility |
- RequestedLayerState::Changes::VisibleRegion;
+ changes |= RequestedLayerState::Changes::Visibility;
}
}