image-copy: Store offscreen buffer for shm capture in session #2185
image-copy: Store offscreen buffer for shm capture in session #2185
Conversation
Age for shm capture is defined as `0` in `render_session()`, so we don't need to also set it 0 here.
Everything implementing `AsGlowRenderer` implements `Renderer` and various other traits, and by making `AsGlowRenderer` depend on these trait, things requiring `AsGlowRenderer` can avoid listing those traits as well. Looks like implied trait bounds still won't work for the `Self::TexutureId` and `Self::Error` requirements? So those are not included here.
Drakulix
left a comment
There was a problem hiding this comment.
Looks good to me, this should be a nice performance improvement!
Avoid allocating a GPU buffer every frame, and avoid re-rendering everything.
e3e803c to
47470fe
Compare
|
Any further improvements to damage tracking can be addressed in a later PR. Avoid extra buffer allocations should be a performance improvement regardless, as long as we see no issues here. I wanted to test this on the darp10 to make sure re-using the buffer didn't get the same graphical corruption issues we we're getting there with dmabuf capture, but it seems I got pop-os/cosmic-workspaces-epoch#280 wrong. And pop-os/cosmic-workspaces-epoch#292 is the correct fix. So a good way to test this may be on a Meteor Lake system like the darp10 alongside pop-os/cosmic-workspaces-epoch#292, with a window playing an animation. (Which I've done; and it seems good now.) |
Requires Smithay/smithay#1960.
Seems okay, but I'm still seeing cursor capture using full damage when nothing has changed. Damage tracking still needs improvement...