diff options
author | Simon Ser <contact@emersion.fr> | 2022-12-02 14:33:02 +0100 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-12-02 14:27:07 +0000 |
commit | f36a5915da5c998d2a55b00dc62adcf9c1797d19 (patch) | |
tree | 805f084f746a23c91102e2bffa09e9cff915f8be /include/wlr | |
parent | c9b378d21a06fd690223a95fe437054dff0228cd (diff) |
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.
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/types/wlr_drm.h | 9 |
1 files changed, 6 insertions, 3 deletions
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 <wayland-server-protocol.h> +#include <wlr/render/drm_format_set.h> 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); |