Dispatch vsync when receiving vsync timeout to handle vsync loss.
Currently we do not have a mechanism to guarantee the arrival of the vsync signal. The vsync signal loss may occur when the renderNodeAnimator is running. The render thread took a long time to perform drawing without time to read the pipe, and the pipe was filled with other signals like configChanged, causing surfaceflinger to miss a vsync signal.
If a vsync lost, causing DisplayEventDispatcher::mWaitingForVsync to be true, resulting in DisplayEventDispatcher::scheduleVsync can no longer schedule another vsync. So we need to dispatch vsync when receiving vsync timeout.
Bug: 204097701
Test: Manual
Change-Id: Ibfa7a301ea17ebd58cae6b790a61d66c3d2e43fd
Signed-off-by: shicheng <shicheng@xiaomi.com>
2 files changed