aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-11-11 16:32:59 +0100
committerSimon Ser <contact@emersion.fr>2022-11-24 21:55:24 +0000
commit42016fa262815c6f1f3513a7cd4d4717b162469c (patch)
tree00e3f0843a7905b65196dd434195dabafa49c109 /include/wlr
parent1978a91717758ae118acdee936c96afbc46e85ca (diff)
compositor: make renderer optional
This is a first step towards moving texture uploading out of wlr_compositor. This commit allows compositors to opt-out of the texture uploading by passing a NULL wlr_renderer. An immediate user of this is gamescope, which currently implements a stub wlr_renderer just to make wlr_compositor happy.
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_compositor.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/wlr/types/wlr_compositor.h b/include/wlr/types/wlr_compositor.h
index 441a6bb5..5a6755c7 100644
--- a/include/wlr/types/wlr_compositor.h
+++ b/include/wlr/types/wlr_compositor.h
@@ -90,7 +90,7 @@ struct wlr_surface_output {
struct wlr_surface {
struct wl_resource *resource;
- struct wlr_renderer *renderer;
+ struct wlr_renderer *renderer; // may be NULL
/**
* The surface's buffer, if any. A surface has an attached buffer when it
* commits with a non-null buffer in its pending state. A surface will not
@@ -168,7 +168,7 @@ struct wlr_renderer;
struct wlr_compositor {
struct wl_global *global;
- struct wlr_renderer *renderer;
+ struct wlr_renderer *renderer; // may be NULL
struct wl_listener display_destroy;
@@ -305,6 +305,9 @@ void wlr_surface_unlock_cached(struct wlr_surface *surface, uint32_t seq);
/**
* Create the wl_compositor global, which can be used by clients to create
* surfaces and regions.
+ *
+ * If a renderer is supplied, the compositor will create struct wlr_texture
+ * objects from client buffers on surface commit.
*/
struct wlr_compositor *wlr_compositor_create(struct wl_display *display,
struct wlr_renderer *renderer);