Skip to content

Commit 708a26c

Browse files
Ram IndaniAndroid (Google) Code Review
authored andcommitted
Merge "[SF] Use render rate for the compositorTiming" into main
2 parents a410ba7 + 6b6d542 commit 708a26c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

services/surfaceflinger/SurfaceFlinger.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3271,12 +3271,12 @@ void SurfaceFlinger::onCompositionPresented(PhysicalDisplayId pacesetterId,
32713271

32723272
const auto schedule = mScheduler->getVsyncSchedule();
32733273
const TimePoint vsyncDeadline = schedule->vsyncDeadlineAfter(presentTime);
3274-
const Period vsyncPeriod = schedule->period();
3274+
const Fps renderRate = pacesetterDisplay->refreshRateSelector().getActiveMode().fps;
32753275
const nsecs_t vsyncPhase =
32763276
mScheduler->getVsyncConfiguration().getCurrentConfigs().late.sfOffset;
32773277

3278-
const CompositorTiming compositorTiming(vsyncDeadline.ns(), vsyncPeriod.ns(), vsyncPhase,
3279-
presentLatency.ns());
3278+
const CompositorTiming compositorTiming(vsyncDeadline.ns(), renderRate.getPeriodNsecs(),
3279+
vsyncPhase, presentLatency.ns());
32803280

32813281
ui::DisplayMap<ui::LayerStack, const DisplayDevice*> layerStackToDisplay;
32823282
{

0 commit comments

Comments
 (0)