SurfaceFlinger: keep LayerInfo history for inactive layers

Instead if clearing the history for past layers, keep a timestamp
that will be used to filter out the frames which are outdated. This
allows us to distinguish between frequent vs. infrequent layers when
we get a buffer after a long time of inactivity.

Test: adb shell /data/nativetest64/libsurfaceflinger_unittest/libsurfaceflinger_unittest
Bug: 147516364
Change-Id: Ieb64cf6fc17a306c2db04b734631334af6703e79
3 files changed