On Fri Mar 1 12:17:14 2024 +0000, Alexandros Frantzis wrote:
The problem with the (invasive) linked list approach is that it doesn't allow us to mark the same drawable for release multiple times (the simplest case when this is needed is when `ctx->draw == ctx->read == old`). We could combine the release list with an extra field in `struct wayland_gl_drawable` to hold the release count, though. If the main concern is the allocations, perhaps we can get away with using a large enough stack array based solution?
You can initialize the list entries on creation, and always list_remove + list_add_tail to make sure it's not added twice.
What I don't like very much is the use of some non-Wine helper, it strongly couples the code to wayland libraries and makes it more difficult to refactor later.