Wayland is a display server. Display servers in general do not render strings. They render bitmaps passed in by the clients. Clients are welcome to use their favorite string render libraries into those bitmaps.
> Wayland can and will block your render loop for arbitrary reasons (like being minimized) potentially indefinitely.
Do you realize that all wayland calls are async? On the client side, you don't have to block on waiting on empty socket, if you do not want.
Few conmmens above, someone complained that a basic wayland client is complicated. The complicated thing was... setting up an event loop.
> If you want to have basic functionality like capturing the screen (former simple XGetImage() call) you have to talk to dbus and pipwire which pull all kind of dependencies and require loads parallel infrastructure running.
Yes; but these dependencies are in different processes, not yours. From the POV of your process, it is just an structured IPC.
XGetImage() is not that simple; it only coincidentally worked due to implementation detail. Having a global framebuffer is not mandatory, just at the time all the PCs had it. Nowadays, even PC hardware is getting overlays, so there might not be a buffer that represents what's on the display anymore.
Another issue is, that it is impossible to implement zero-copy screen casting with XGetImage(). It is possible and has been done with wayland and dmabuf, feeding the screencasted surface into hardware video encoder (without the buffer bouncing between system and GPU ram several times), and the userspace getting already compressed video stream.
Final issue is, that XGetImage() is not gated via user permission and does not provide indicators, that the screen was grabbed or is being casted. Wayland does.
Wayland is a display server. Display servers in general do not render strings. They render bitmaps passed in by the clients. Clients are welcome to use their favorite string render libraries into those bitmaps.
> Wayland can and will block your render loop for arbitrary reasons (like being minimized) potentially indefinitely.
Do you realize that all wayland calls are async? On the client side, you don't have to block on waiting on empty socket, if you do not want.
Few conmmens above, someone complained that a basic wayland client is complicated. The complicated thing was... setting up an event loop.
> If you want to have basic functionality like capturing the screen (former simple XGetImage() call) you have to talk to dbus and pipwire which pull all kind of dependencies and require loads parallel infrastructure running.
Yes; but these dependencies are in different processes, not yours. From the POV of your process, it is just an structured IPC.
XGetImage() is not that simple; it only coincidentally worked due to implementation detail. Having a global framebuffer is not mandatory, just at the time all the PCs had it. Nowadays, even PC hardware is getting overlays, so there might not be a buffer that represents what's on the display anymore.
Another issue is, that it is impossible to implement zero-copy screen casting with XGetImage(). It is possible and has been done with wayland and dmabuf, feeding the screencasted surface into hardware video encoder (without the buffer bouncing between system and GPU ram several times), and the userspace getting already compressed video stream.
Final issue is, that XGetImage() is not gated via user permission and does not provide indicators, that the screen was grabbed or is being casted. Wayland does.