smithay icon indicating copy to clipboard operation
smithay copied to clipboard

Check our handling of buffer destroy semantics.

Open elinorbgr opened this issue 3 years ago • 3 comments

According to folks on #wayland, it is valid for a client to destroy a buffer right after having commited it (and thus before receiving a release event). The compositor should still be able to set the surface content accordingly.

When doing so, a client simply promises that it'll never modify the underlying storage for the buffer ever again. Some clients use that to set surface contents in a one-shot way (for example swaybg does this).

We should check that our current implementation (in particular all the transaction and state caching logic) does correctly respect that, and if not, fix it.

elinorbgr avatar Jun 27 '22 08:06 elinorbgr

For what it is worth: swaybg works fine with smithay today, so we probably do handle this correctly. I agree though we should make sure and potentially add some comments.

Drakulix avatar Jun 27 '22 10:06 Drakulix

Doesn't wl-shm have a stricter requirement than mentioned in #wayland?

i509VCB avatar Jun 27 '22 13:06 i509VCB

Stricter how so?

elinorbgr avatar Jun 28 '22 12:06 elinorbgr