From d368028bd5557810af954ef96bf0f4addd97f551 Mon Sep 17 00:00:00 2001 From: Austin Shafer Date: Wed, 31 Jan 2024 15:37:07 -0500 Subject: allocator: remove backend parameter in allocator_autocreate_with_drm_fd Since we only use the backend capabilities here we can simply pass them in directly. This allows other locations to create an allocator even if they don't have a backend. They can simply specify the caps they want instead. --- backend/drm/renderer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'backend') diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c index 321d583c..e4aadc10 100644 --- a/backend/drm/renderer.c +++ b/backend/drm/renderer.c @@ -6,6 +6,7 @@ #include "backend/drm/drm.h" #include "backend/drm/fb.h" #include "backend/drm/renderer.h" +#include "backend/backend.h" #include "render/drm_format_set.h" #include "render/allocator/allocator.h" #include "render/pixel_format.h" @@ -19,7 +20,8 @@ bool init_drm_renderer(struct wlr_drm_backend *drm, return false; } - renderer->allocator = allocator_autocreate_with_drm_fd(&drm->backend, + uint32_t backend_caps = backend_get_buffer_caps(&drm->backend); + renderer->allocator = allocator_autocreate_with_drm_fd(backend_caps, renderer->wlr_rend, drm->fd); if (renderer->allocator == NULL) { wlr_log(WLR_ERROR, "Failed to create allocator"); -- cgit v1.2.3