Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa35a066 authored by Su Hong Koo's avatar Su Hong Koo
Browse files

SF: Re-initialize EventThread::mVSyncState on new pacesetter selection

Right now, the EventThread's main loop clears mVSyncState whenever the
pacesetter display is hotplug-disconnected. This is due to the
underlying assumption that an active/pacesetter display will never be
disconnected. When the mVsyncState is cleared, the EventThread ignores
other vsync signals until the display is hotplug-connected, which
essentially stalls the composition loop.

With the pacesetter migration work, the pacesetter display driving the
EventThread can be external, and can be disconnected. To avoid stalling
the event thread and the apps, this CL changes the EventThread to look
at the mVsyncState when a new vsync schedule is passed in (when the
pacesetter changes), and re-initializes it if not present.

Flag: com.android.graphics.surfaceflinger.flags.pacesetter_selection
Bug: 389983418, 241286431
Test: Manually tested on a foldable by unplugging external pacestter
Change-Id: I6fde0557c262dabdeaacc2e05db6eff56073a5ee
parent b58f74f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment