diff options
author | Simon Ser <contact@emersion.fr> | 2021-09-28 13:00:25 +0200 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-09-30 08:50:43 -0600 |
commit | 3d0848daae40a8a471282431eac8310e5d051d33 (patch) | |
tree | cf7e822c141c1cd350d23abfb5aa672f95437072 /backend/drm | |
parent | 20d9448257f4871d3a57deab2f105d7335a64fb2 (diff) |
backend: create renderer and allocator in wlr_backend_autocreate
Instead of ensuring the renderer and allocator are initialized in each
backend, do it in wlr_backend_autocreate. This allows compositors to
create backends without any renderer/allocator if they side-step
wlr_backend_autocreate.
Since the wlr_backend_get_renderer and backend_get_allocator end up
calling wlr_renderer_autocreate and wlr_allocator_autocreate, it sounds
like a good idea to centralize all of the opimionated bits in one place.
Diffstat (limited to 'backend/drm')
-rw-r--r-- | backend/drm/backend.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/backend/drm/backend.c b/backend/drm/backend.c index 52230592..9ae4dbf0 100644 --- a/backend/drm/backend.c +++ b/backend/drm/backend.c @@ -11,7 +11,6 @@ #include <wlr/interfaces/wlr_output.h> #include <wlr/util/log.h> #include <xf86drm.h> -#include "backend/backend.h" #include "backend/drm/drm.h" #include "util/signal.h" @@ -258,12 +257,6 @@ struct wlr_backend *wlr_drm_backend_create(struct wl_display *display, } } - struct wlr_renderer *renderer = wlr_backend_get_renderer(&drm->backend); - struct wlr_allocator *allocator = backend_get_allocator(&drm->backend); - if (renderer == NULL || allocator == NULL) { - goto error_mgpu_renderer; - } - drm->session_destroy.notify = handle_session_destroy; wl_signal_add(&session->events.destroy, &drm->session_destroy); |