From f36a5915da5c998d2a55b00dc62adcf9c1797d19 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 2 Dec 2022 14:33:02 +0100 Subject: wl-drm: don't store wlr_renderer Query the formats at init time, then forget about the renderer. This will allow wl_drm to be created with a list of formats instead of a renderer, and will behave better after a GPU reset. --- include/wlr/types/wlr_drm.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/wlr/types/wlr_drm.h b/include/wlr/types/wlr_drm.h index efcf139f..61780b18 100644 --- a/include/wlr/types/wlr_drm.h +++ b/include/wlr/types/wlr_drm.h @@ -10,6 +10,7 @@ #define WLR_TYPES_WLR_DRM_H #include +#include struct wlr_renderer; @@ -30,15 +31,17 @@ struct wlr_drm_buffer { */ struct wlr_drm { struct wl_global *global; - struct wlr_renderer *renderer; - char *node_name; struct { struct wl_signal destroy; } events; + // private state + + char *node_name; + struct wlr_drm_format_set formats; + struct wl_listener display_destroy; - struct wl_listener renderer_destroy; }; bool wlr_drm_buffer_is_resource(struct wl_resource *resource); -- cgit v1.2.3