SurfaceFlinger: fix infrequent frames logic

While playing video in YouTube, the UI posts sometimes 2 buffers
very close to each other, but overall frame rate is very low (~fps).
Fix the infrequent logic to detect this scenario.

Test: adb shell /data/nativetest64/libsurfaceflinger_unittest/libsurfaceflinger_unittest
Bug: 147516364
Change-Id: Ie821252f793a18bb8830ac6582b9d99ab8b1c8f6
2 files changed