From f7e3d325fe3d99b8f3930718257c849943dbe34b Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 2 Feb 2021 16:06:43 +0100 Subject: Add a stub wl_drm implementation This will allow us to remove all of our EGL wl_drm support code and remove some weird stuff we need just for wl_drm support. In particular, wl_drm buffers coming from the EGL implementation can't easily be wrapped into a wlr_buffer properly. --- include/wlr/types/wlr_drm.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 include/wlr/types/wlr_drm.h (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_drm.h b/include/wlr/types/wlr_drm.h new file mode 100644 index 00000000..51764928 --- /dev/null +++ b/include/wlr/types/wlr_drm.h @@ -0,0 +1,36 @@ +/* + * This an unstable interface of wlroots. No guarantees are made regarding the + * future consistency of this API. + */ +#ifndef WLR_USE_UNSTABLE +#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features" +#endif + +#ifndef WLR_TYPES_WLR_DRM_H +#define WLR_TYPES_WLR_DRM_H + +#include + +struct wlr_renderer; + +/** + * A stub implementation of Mesa's wl_drm protocol. + * + * It only implements the minimum necessary for modern clients to behave + * properly. In particular, flink handles are left unimplemented. + */ +struct wlr_drm { + struct wl_global *global; + char *node_name; + + struct { + struct wl_signal destroy; + } events; + + struct wl_listener display_destroy; +}; + +struct wlr_drm *wlr_drm_create(struct wl_display *display, + struct wlr_renderer *renderer); + +#endif -- cgit v1.2.3