SF: use peak refresh rate for HWC backpressure
The logic we have for selecting which fence to use to detect
backpressure replies on the assumption that continuously presents as
the rate of vsync. This is not true for VRR displays.
Bug: 296635687
Test: adb root && adb shell service call SurfaceFlinger 1045 f 0.9
Change-Id: Iaceb45741fd657b8c551f51b3c76a643df116da8
diff --git a/services/surfaceflinger/Scheduler/VsyncSchedule.h b/services/surfaceflinger/Scheduler/VsyncSchedule.h
index 60c4105..722ea0b 100644
--- a/services/surfaceflinger/Scheduler/VsyncSchedule.h
+++ b/services/surfaceflinger/Scheduler/VsyncSchedule.h
@@ -64,6 +64,7 @@
// IVsyncSource overrides:
Period period() const override;
TimePoint vsyncDeadlineAfter(TimePoint) const override;
+ Period minFramePeriod() const override;
// Inform the schedule that the display mode changed the schedule needs to recalibrate
// itself to the new vsync period. The schedule will end the period transition internally.