render: unify texture format enumeration

Instead of having separate get_shm_texture_formats and
get_dmabuf_texture_formats functions, have a single unified
get_texture_formats function. This brings the renderer API in line
with wlr_backend_impl.
This commit is contained in:
Simon Ser 2021-08-16 15:15:12 +02:00
parent 823476e76e
commit b47535f1a2
12 changed files with 55 additions and 74 deletions

View file

@ -160,7 +160,7 @@ static void drm_bind(struct wl_client *client, void *data,
wl_drm_send_capabilities(resource, WL_DRM_CAPABILITY_PRIME);
const struct wlr_drm_format_set *formats =
wlr_renderer_get_dmabuf_texture_formats(drm->renderer);
wlr_renderer_get_texture_formats(drm->renderer, WLR_BUFFER_CAP_DMABUF);
if (formats == NULL) {
return;
}

View file

@ -879,8 +879,8 @@ static void linux_dmabuf_send_modifiers(struct wl_resource *resource,
static void linux_dmabuf_send_formats(struct wlr_linux_dmabuf_v1 *linux_dmabuf,
struct wl_resource *resource) {
const struct wlr_drm_format_set *formats =
wlr_renderer_get_dmabuf_texture_formats(linux_dmabuf->renderer);
const struct wlr_drm_format_set *formats = wlr_renderer_get_texture_formats(
linux_dmabuf->renderer, WLR_BUFFER_CAP_DMABUF);
if (formats == NULL) {
return;
}