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
Loading
Please register or sign in to comment