SurfaceFlinger: ignore invisible layers

We keeps around layers that explicitly voted with
setFrameRate API even if those are not visible. This is to be able
to react when those become visible.
However there is a bug in that logic that causes SurfaceFlinger to treat
explicit invisible layers as Max.

Bug: 153111478
Bug: 156506455
Test: adb shell /data/nativetest64/libsurfaceflinger_unittest/libsurfaceflinger_unittest
Change-Id: I15dde0b79bf670874edee90336caa812f791cf26
2 files changed