Ensure non visible layers that have input are traversed for input

If a Layer wasn't visible and nothing else changed that vsync, the
sortSnapshotsByZ function would return early and not update the z
ordered list to include the non visible input layer. Since layers can
have input even if they have no visible content, we need to include them

Test: LayerSnapshotTest#NonVisibleLayerWithInput
Bug: 320370937
Change-Id: I89dd0cdefbd0948f40089b6f7f321ad84b4ad357
2 files changed