diff options
author | Austin Shafer <ashafer@nvidia.com> | 2024-01-31 15:37:07 -0500 |
---|---|---|
committer | Austin Shafer <ashafer@nvidia.com> | 2024-02-02 16:36:31 -0500 |
commit | d368028bd5557810af954ef96bf0f4addd97f551 (patch) | |
tree | fbf38f01dc4999bc0636b2e480e1a798d6daf583 /backend | |
parent | a8aeadeab2820e670316ddae3e0da0d6815dd253 (diff) |
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.
Diffstat (limited to 'backend')
-rw-r--r-- | backend/drm/renderer.c | 4 |
1 files changed, 3 insertions, 1 deletions
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"); |