virtualx-engine/platform
Riteo 2e07dcf1e7 Wayland: suspend window after frame timeout or suspend state
This is a pretty popular approach that took a while for me to wrap my
head around and which only recently got "official" support through an
update (xdg_shell version 6), so I think that this is all-in-all a
better option than the overkill 2000Hz ticking we have now :P

Basically, we wait for a frame event and, if either too much time passes
or we get the new `suspended` state, we consider the window as "hidden"
and stop drawing, ticking by the low usage rate.

This should work great for KDE and Mutter, which support the new state,
but not yet for sway, which is still stuck at a very old xdg_shell
version and thus falls back to the timeout approach.

Be aware that if we rely on timing out the engine will have to stall for
the whole timeout, which _could_ be problematic but doensn't seem like
it. Further testing is needed.

Special thanks go to the guys over at #wayland on OFTC, who very
patiently explained me this approach way too many times.
2024-02-15 23:48:56 +01:00
..
android Merge pull request #88351 from BZ1234567890/issue-87059-master 2024-02-15 15:45:23 +01:00
ios Merge pull request #86966 from Muller-Castro/value2ref-core 2024-02-15 15:44:43 +01:00
linuxbsd Wayland: suspend window after frame timeout or suspend state 2024-02-15 23:48:56 +01:00
macos Merge pull request #88274 from bruvzg/macos_hdr_picker 2024-02-15 17:35:48 +01:00
web Merge pull request #86966 from Muller-Castro/value2ref-core 2024-02-15 15:44:43 +01:00
windows Merge pull request #86093 from bruvzg/d3d12_export 2024-02-15 17:35:32 +01:00
register_platform_apis.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
SCsub