Screencopy to dmabuf presented using subsurfaces #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on pop-os/iced#79.
This is meant to address the performance issues we have with shm screencopy, and rendering the workspaces view. We can screencopy to a dmabuf and attach it to a subsurface without copying image data to main memory, or having the iced renderer deal with the image data. If incremental rendering is done properly, this should preform pretty well even with Iced's software renderer, so we don't depend on a glow or wgpu renderer without or without dmabuf import.
I initially prototyped this in the
wip-dmabuf_nobuild
branch, which just used sctk and removed iced (also losing text rendering, iced widget layout system, and any other features provided with iced). This showed it worked and performed well, but it needed some way to integrate with other UI elements. Adding aSubsurface
widget to iced-sctk provides a clean way to do this.The changes here are fairly minimal since I've pushed a lot of the groundwork (sharing a Wayland connection with iced, gbm buffer allocation, etc.) for it to
master_jammy
while keeping that working with the existing shm+iced image approach for now.Current issues:
Subsurface
should offer similar options to theImage
widget.[EGL] 0x300c (BAD_PARAMETER) eglCreateImageKHR: EGL_BAD_PARAMETER error: In eglCreateImageKHR: requested buffer attributes are not supported
wip-dmabuf_nobuild
branch, which worked before.wl_buffer::release
is called, while swapping between at least two capture buffers. I'm not sure about the best way to handle that yet.