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
Loading
Please register or sign in to comment