linebender / parley

Rich text layout library
Apache License 2.0
229 stars 28 forks source link

vello_editor: Use PresentMode::Mailbox when available. #144

Closed xorgy closed 1 month ago

xorgy commented 1 month ago

AutoVsync/FIFO introduces unnecessary latency, especially on X11. There aren't animations in vello_editor so the downside (extra work) is not significant.

tomcur commented 1 month ago

As a data point: with this PR the example now works on my platform (Wayland on AMD GPU), previously it would nearly instantly crash with failed to get surface texture: Timeout, unless I changed AutoVsync to AutoNoVsync (and maybe Mailbox would've also worked).

xorgy commented 1 month ago

@tomcur that is certainly odd! AutoVsync should fall back to FIFO, which should be supported on all platforms including Wayland... but with that message it's apparently less about compatibility, but rather about missing a deadline. As for AutoNoVsync, it's possible it selected Mailbox on your system.