From 76b3687739636d4090169e85ea604a4eeb8b6502 Mon Sep 17 00:00:00 2001
From: Simon Ser <contact@emersion.fr>
Date: Thu, 24 Nov 2022 09:54:51 +0100
Subject: shm: add create() function without a wlr_renderer

This allows compositors which don't use wlr_renderer to still use
wlroots' wl_shm implementation.
---
 include/wlr/types/wlr_shm.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

(limited to 'include')

diff --git a/include/wlr/types/wlr_shm.h b/include/wlr/types/wlr_shm.h
index ebf4015e..5816c84e 100644
--- a/include/wlr/types/wlr_shm.h
+++ b/include/wlr/types/wlr_shm.h
@@ -24,6 +24,17 @@ struct wlr_shm;
 
 /**
  * Create the wl_shm global.
+ *
+ * Compositors using struct wlr_renderer should use wlr_shm_create_with_renderer()
+ * instead.
+ */
+struct wlr_shm *wlr_shm_create(struct wl_display *display, uint32_t version,
+	const uint32_t *formats, size_t formats_len);
+
+/**
+ * Create the wl_shm global.
+ *
+ * The pixel formats advertised to clients are taken from the struct wlr_renderer.
  */
 struct wlr_shm *wlr_shm_create_with_renderer(struct wl_display *display,
 	uint32_t version, struct wlr_renderer *renderer);
-- 
cgit v1.2.3