Smithay / smithay

A smithy for rusty wayland compositors
MIT License
1.74k stars 153 forks source link

Headless rendering surfaces #287

Open elinorbgr opened 3 years ago

elinorbgr commented 3 years ago

At some point we'll need to consider headless rendering surface, as well as APIs to create and destroy them dynamically.

Potential uses for that could be RDP support or single window streaming to pipewire (by creating a temporary headless surface on which only the window of interest is displayed)

Drakulix commented 3 years ago

single window streaming to pipewire (by creating a temporary headless surface on which only the window of interest is displayed)

That should not be necessary. Single window sharing should likely be done by the export_dmabuf protocol, so all you need to do is allocate a dmabuf and render the surface into that before sending it to pipewire.

And because all our renderers can render into a dmabuf, they serve as a "headless surface" just fine, but we might want to expose some helpers to easily extract the image data.