Skip to content

Commit 6b6d542

Browse files
author
ramindani
committed
[SF] Use render rate for the compositorTiming
Vsync Period does not represent the actual composition rate in the framework anymore, render rate is the more accurate composition rate. BUG: 383938139 BUG: 355342197 Flag: EXEMPT bug fix Test: atest CtsDeqpTestCases --test-filter '*dEQP-EGL.functional.get_frame_timestamps*' Test: Before fix http://ab/I51300010353712246 Test: After the fix http://ab/I22500010354940353 Change-Id: I33574b3ff347264a19e2e0bcfd2236639aad01a5
1 parent dfab519 commit 6b6d542

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)