Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5dc426e6 authored by Robert Carr's avatar Robert Carr Committed by Rob Carr
Browse files

SurfaceFlinger-Input: Ignore invisible layers for occlusion detection

For legacy compatibility reasons, we allow apps to receive input prior
to submitting their first buffer, and for this reason we check
canReceiveInput() to populate InputWindowInfo#visible, rather than
directly calling isVisible(). However, in the case of layers which
can't receive input (!hasInputInfo()) and are exclusively being used
for occlusion detection we have no such legacy requirement and so we can just
directly check the visibility value. Obviously this doesn't
cause any problems with occlusion detection, since if the layer
isn't being drawn it can't occlude anything. This semantic is
very useful as it allows BufferLayers which no buffer drawn to be used
as ContainerLayers, as we frequently use SurfaceView for.

Bug: 157772682
Test: Existing tests pass.
Change-Id: Iadcd5d8fc4016ee1f88480a50bb3555797830560
parent 98c34a8c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment