SF: Use default minimal refresh rate between frames
When calculating duplicate frames make sure the minimal period
is at least Fps(120).toPeriodNsecs(). It's not okay to use
min period equal to the max refresh rate at layer creation,
because the supported refresh rates can change. E.g. initially
it can be 24hz and later (bacause another display is plugged)
it can be 60hz, which will cause a lot of frames to be considered
as duplicates.
Bug: 159590486
Test: presubmit
Change-Id: I4424c05012925273ed6ea8254fb975bf8fe7d058
diff --git a/services/surfaceflinger/Scheduler/LayerHistory.h b/services/surfaceflinger/Scheduler/LayerHistory.h
index 4214bab..bae9b5a 100644
--- a/services/surfaceflinger/Scheduler/LayerHistory.h
+++ b/services/surfaceflinger/Scheduler/LayerHistory.h
@@ -46,7 +46,7 @@
~LayerHistory();
// Layers are unregistered when the weak reference expires.
- void registerLayer(Layer*, Fps highRefreshRate, LayerVoteType type);
+ void registerLayer(Layer*, LayerVoteType type);
// Sets the display size. Client is responsible for synchronization.
void setDisplayArea(uint32_t displayArea) { mDisplayArea = displayArea; }