Root: increase transaction timeout to 100ms

This was dropped from 200ms to 50ms in 4a65af66. However 50ms seems
to be a bit too short in practice. I often hit ugly frame imperfection
do to timeouts when toggling mpv between a small floating window and
fullscreen for example, even on a relatively beefy desktop computer.

This only happens while the video is playing in mpv, not while it is
paused. I believe this is due to mpv ignoring the compositor's hints for
when to render a new frame entirely while playing a video. It instead
renders at the framerate of the video being played, even if the
compositor requests a change in size. This isn't great but seems
unlikely to change [1].

Overall, hitting 100ms timeouts subjectively doesn't feel anywhere near
as sluggish as hitting 200ms timeouts and offers better frame perfection
than 50ms timeouts in at least this one example, there are bound to be
others.

[1]: https://dudemanguy.github.io/blog/posts/2022-06-10-wayland-xorg/wayland-xorg.html
This commit is contained in:
Isaac Freund 2024-03-17 22:48:06 +01:00
parent ff8365d350
commit f3cd98288a
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11

View File

@ -607,7 +607,7 @@ fn sendConfigures(root: *Root) void {
root.inflight_configures,
});
root.transaction_timeout.timerUpdate(50) catch {
root.transaction_timeout.timerUpdate(100) catch {
std.log.scoped(.transaction).err("failed to update timer", .{});
root.commitTransaction();
};