aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-02-02 16:06:43 +0100
committerSimon Zeni <simon@bl4ckb0ne.ca>2021-07-05 11:13:41 -0400
commitf7e3d325fe3d99b8f3930718257c849943dbe34b (patch)
treeeafa24e382072e916760bb44f01bb0703525dd8a /include/wlr
parent78121ad2d8b1b2fe95d137b6b6baa7a163dd5be6 (diff)
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.
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_drm.h36
1 files changed, 36 insertions, 0 deletions
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 <wayland-server-protocol.h>
+
+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