Skip to content

Draft: Compute next frame time on headless outputs

Brett Ernst requested to merge clamps/wlroots:headless-frame-timing into master

In order to mitigate clock drift, this is an attempt to compute the next desired frame time for a headless output. While the timer still operates with millisecond-resolution, the idea here is to prevent error from building up over time. If the next desired frame time is in the past, a new frame will be requested as soon as the loop goes idle (as requesting it immediately or with a zero-timer is a no-op). If a frame is requested immediately, further frames will be scheduled with the current time as a base instead of the originally-desired time.

I look forward to feedback or corrections.

Merge request reports

Loading