Skip invisible windows in input list

To reduce traffic sent over binder and the number of copied objects in native code, we decide to remove windows from WindowInfosListener that are not visible because input doesn't need to know about the windows that aren't visible, and invisible windows don't affect the operation of other windows.

Fixes: 305254099
Test: adb shell su root dumpsys SurfaceFlinger
Test: atest LayerSnapshotTest
Flag: EXEMPT bugfix
Change-Id: I1ccc29565ee92277a703d16c07fd1141d6df6862
5 files changed