backend/headless: use common renderer and allocator

Instead of managing our own renderer and allocator, let the common
code do it.

Because wlr_headless_backend_create_with_renderer needs to re-use
the parent renderer, we have to hand-roll some of the renderer
initialization.
This commit is contained in:
Simon Ser 2021-04-29 09:18:19 +02:00 committed by Kenny Levinsen
parent 349553d011
commit c82f37542d
3 changed files with 32 additions and 30 deletions

View file

@ -9,16 +9,14 @@
struct wlr_headless_backend {
struct wlr_backend backend;
int drm_fd;
struct wlr_renderer *renderer;
struct wlr_allocator *allocator;
struct wlr_drm_format *format;
struct wl_display *display;
struct wl_list outputs;
size_t last_output_num;
struct wl_list input_devices;
struct wl_listener display_destroy;
struct wl_listener renderer_destroy;
bool has_parent_renderer;
struct wlr_renderer *parent_renderer;
struct wl_listener parent_renderer_destroy;
bool started;
};