backend/drm: use public wlr_allocator_autocreate()

We don't need any custom behavior since d8c0707e27 ("backend/drm: return
secondary backend DRM FD").
This commit is contained in:
Simon Ser 2024-11-07 18:50:25 +01:00
parent 4ec1defb3e
commit 4c4d74a564

View File

@ -1,5 +1,6 @@
#include <assert.h> #include <assert.h>
#include <drm_fourcc.h> #include <drm_fourcc.h>
#include <wlr/render/allocator.h>
#include <wlr/render/drm_syncobj.h> #include <wlr/render/drm_syncobj.h>
#include <wlr/render/swapchain.h> #include <wlr/render/swapchain.h>
#include <wlr/render/wlr_renderer.h> #include <wlr/render/wlr_renderer.h>
@ -9,7 +10,6 @@
#include "backend/drm/renderer.h" #include "backend/drm/renderer.h"
#include "backend/backend.h" #include "backend/backend.h"
#include "render/drm_format_set.h" #include "render/drm_format_set.h"
#include "render/allocator/allocator.h"
#include "render/pixel_format.h" #include "render/pixel_format.h"
#include "render/wlr_renderer.h" #include "render/wlr_renderer.h"
@ -21,9 +21,7 @@ bool init_drm_renderer(struct wlr_drm_backend *drm,
return false; return false;
} }
uint32_t backend_caps = backend_get_buffer_caps(&drm->backend); renderer->allocator = wlr_allocator_autocreate(&drm->backend, renderer->wlr_rend);
renderer->allocator = allocator_autocreate_with_drm_fd(backend_caps,
renderer->wlr_rend, drm->fd);
if (renderer->allocator == NULL) { if (renderer->allocator == NULL) {
wlr_log(WLR_ERROR, "Failed to create allocator"); wlr_log(WLR_ERROR, "Failed to create allocator");
wlr_renderer_destroy(renderer->wlr_rend); wlr_renderer_destroy(renderer->wlr_rend);