summaryrefslogtreecommitdiff
path: root/libs/gui/LayerState.cpp
diff options
context:
space:
mode:
author Dominik Laskowski <domlaskowski@google.com> 2024-03-06 17:42:39 -0500
committer Dominik Laskowski <domlaskowski@google.com> 2024-03-19 20:58:10 +0000
commit963da1c0252dab01f65617c9ca08e66ff6596581 (patch)
treebcc010df46438e5be5c8da372c9bb36605f18a82 /libs/gui/LayerState.cpp
parenteb83011e1db18c15af48e143b4d85b2f8a8f19cb (diff)
SF: Match followers' refresh rate to pacesetter's
Multi-display refresh rate selection was flawed: The scheduler runs the refresh rate selection algorithm for each display, and then filters the candidate modes of each follower to match the pacesetter's refresh rate. This means that: 1. The followers incorrectly consider refresh rates that don't match the pacesetter. Because the DM-specified constraint is [59, 61] Hz, some situations caused selection of a fractional rate (e.g. 59.94) instead of 60 on certain external displays. The result would be black screens for several seconds due to mode sets if the selection was not stable. 2. The followers incorrectly evaluate heuristics that should only affect the pacesetter, e.g. per-surface votes, global signals. Fix this by teaching RefreshRateSelector about follower displays. Foldables also benefit from no longer running the algorithm twice. Fixes: 324188430 Bug: 329111930 Test: No black screen for 4 seconds upon rotating mirrored YouTube. Test: 60+60 still works on foldables. Test: RefreshRateSelectorTest.pacesetterConsidered Change-Id: Ie1b27e81d860a709c85651f068fedb2b496861de Merged-In: Ie1b27e81d860a709c85651f068fedb2b496861de
Diffstat (limited to 'libs/gui/LayerState.cpp')
0 files changed, 0 insertions, 0 deletions