wlroots
wlroots copied to clipboard
Replace wlr_XXX_is_YYY and wlr_XXX_from_YYY
We have lots of those.
For instance, we have:
-
wlr_dmabuf_resource_is_buffer
which checks if a resource is a buffer -
wlr_dmabuf_buffer_from_buffer_resource
which asserts that the resource is a buffer and returns it
We could deduplicate and simplify that into just one wlr_dmabuf_buffer_from_buffer_resource
function which returns NULL if the resource is not a DMA-BUF. Callers can assert
the returned value if they want to. This would be more consistent with the Wayland API which has:
struct wl_shm_buffer *wl_shm_buffer_get(struct wl_resource *resource)
wlroots has migrated to gitlab.freedesktop.org. This issue has been moved to:
https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884