Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
WIP: add support for direct scan-out #1641
This adds support for direct scan-out. This is a required feature before working on planes.
This PR tries to to as little changes as possible to make it easy to review and avoid re-writing everything. The current DRM backend and interface are not great but refactoring can happen incrementally with future PRs.
This PR is missing a lot of checks. I first wanted to make sure this actually works. I've tested with a modified version of
I'm not sure
Test plan: try those fullscreen
// Same as wlr_output_make_current bool wlr_output_attach_render(struct wlr_output *output); // Instead of rendering to a buffer, use an existing DMA-BUF bool wlr_output_attach_dmabuf(struct wlr_output *output, struct wlr_dmabuf_attributes *attrs); // Submit a frame bool wlr_output_present(struct wlr_output *output); // or commit, see #1640
This is now working pretty well. Apart from the API not being final yet, there is one more issue: synchronization.
When compositing, we can send
When scanning out, we need to wait for the buffer to stop being visible before sending
To fix this, I think the most straightforward solution is to pass the