Revert "Revert "SF: pass a render rate to VsyncTracker instead of a divisor""
This reverts commit 3d21d3afa1056efacf702b74449f9e2e7b5701f1.
Reason for revert: https://b.corp.google.com/issues/269561042#comment14
Bug: 269561042
Change-Id: Iae8d0e62be2eafb4278b64ffcb1524ece211a00c
diff --git a/services/surfaceflinger/Scheduler/Scheduler.cpp b/services/surfaceflinger/Scheduler/Scheduler.cpp
index 17cdff9..dab01ba 100644
--- a/services/surfaceflinger/Scheduler/Scheduler.cpp
+++ b/services/surfaceflinger/Scheduler/Scheduler.cpp
@@ -418,11 +418,7 @@
ALOGV("%s %s (%s)", __func__, to_string(mode.fps).c_str(),
to_string(mode.modePtr->getFps()).c_str());
- const auto divisor = RefreshRateSelector::getFrameRateDivisor(mode.modePtr->getFps(), mode.fps);
- LOG_ALWAYS_FATAL_IF(divisor == 0, "%s <> %s -- not divisors", to_string(mode.fps).c_str(),
- to_string(mode.fps).c_str());
-
- mVsyncSchedule->getTracker().setDivisor(static_cast<unsigned>(divisor));
+ mVsyncSchedule->getTracker().setRenderRate(renderFrameRate);
}
void Scheduler::resync() {