aboutsummaryrefslogtreecommitdiff
path: root/backend/headless
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2021-04-15 14:32:13 -0400
committerSimon Ser <contact@emersion.fr>2021-04-28 20:55:57 +0200
commitc75aa71816826907805606a108626b4671120a7e (patch)
tree471aa3d45646e571555829a88bd506d0cfc09e2a /backend/headless
parent3a04fb4560cf60c34bd968fe711a45d42993e5a4 (diff)
render/gbm_allocator: make wlr_gbm_allocator_create return a wlr_allocator
Diffstat (limited to 'backend/headless')
-rw-r--r--backend/headless/backend.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/backend/headless/backend.c b/backend/headless/backend.c
index 822024b3..1ca1c183 100644
--- a/backend/headless/backend.c
+++ b/backend/headless/backend.c
@@ -220,21 +220,21 @@ struct wlr_backend *wlr_headless_backend_create(struct wl_display *display) {
goto error_dup;
}
- struct wlr_gbm_allocator *gbm_alloc = wlr_gbm_allocator_create(drm_fd);
- if (gbm_alloc == NULL) {
+ struct wlr_allocator *alloc = wlr_gbm_allocator_create(drm_fd);
+ if (alloc == NULL) {
wlr_log(WLR_ERROR, "Failed to create GBM allocator");
close(drm_fd);
goto error_dup;
}
- if (!backend_init(backend, display, &gbm_alloc->base, NULL)) {
+ if (!backend_init(backend, display, alloc, NULL)) {
goto error_init;
}
return &backend->backend;
error_init:
- wlr_allocator_destroy(&gbm_alloc->base);
+ wlr_allocator_destroy(alloc);
error_dup:
close(backend->drm_fd);
error_drm_fd:
@@ -266,14 +266,14 @@ struct wlr_backend *wlr_headless_backend_create_with_renderer(
goto error_dup;
}
- struct wlr_gbm_allocator *gbm_alloc = wlr_gbm_allocator_create(drm_fd);
- if (gbm_alloc == NULL) {
+ struct wlr_allocator *alloc = wlr_gbm_allocator_create(drm_fd);
+ if (alloc == NULL) {
wlr_log(WLR_ERROR, "Failed to create GBM allocator");
close(drm_fd);
goto error_dup;
}
- if (!backend_init(backend, display, &gbm_alloc->base, renderer)) {
+ if (!backend_init(backend, display, alloc, renderer)) {
goto error_init;
}
@@ -283,7 +283,7 @@ struct wlr_backend *wlr_headless_backend_create_with_renderer(
return &backend->backend;
error_init:
- wlr_allocator_destroy(&gbm_alloc->base);
+ wlr_allocator_destroy(alloc);
error_dup:
close(backend->drm_fd);
error_drm_fd: