mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
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.
This commit is contained in:
parent
a8aeadeab2
commit
d368028bd5
3 changed files with 8 additions and 5 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue