A better screenshooter protocol
We're building a protocol for DMA-BUF exporting (#11). In case it's not possible to use it (because the backend doesn't support it, eg. Wayland/X11/headless), we need a fallback which involves copying to a client buffer. Currently this is done with an old version of the Orbital screenshooter protocol. However, this doesn't let the client request to capture other clients or regions. Also the buffer setup is a little hacky because it requires the client to guess the buffer settings from the output mode. The protocol doesn't let us add flags (like "inverted_y") that would speed up the copy operation.
Since the outdated protocol doesn't seem to be used by anyone except wlroots, I'd like to improve it and improve the integration with the DMA-BUF export protocol to make automatic fallback easier.
Prior art:
- Orbital: https://github.com/giucam/orbital/blob/master/protocol/screenshooter.xml
KDE (it's closer to our DMA-BUF export interface, but with GBM FDs): https://github.com/KDE/kwayland/blob/master/src/client/protocols/remote-access.xml