diff options
author | Simon Ser <contact@emersion.fr> | 2022-10-07 14:19:26 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2022-10-07 19:21:20 +0000 |
commit | e92b272616ecd6618d2568c4e8d07228447ff72a (patch) | |
tree | 7227e0e29c6aeb13963256b7a5694512e0c612b6 | |
parent | 7d8284ec1095057b8cd3e14f38982f14cb1f99c4 (diff) |
output/render: make output_ensure_buffer() no-op when missing renderer
Some compositors want to have full control over the buffers attached
to the output, and don't want to use the internal swapchain. Such
compositors include KWinFT (allocates its buffers on its own) and
gamescope (uses a headless output without any buffers).
Let's just make output_ensure_buffer() a no-op in that case.
-rw-r--r-- | types/output/render.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/types/output/render.c b/types/output/render.c index 9e0b77c3..4ccfb70d 100644 --- a/types/output/render.c +++ b/types/output/render.c @@ -191,6 +191,12 @@ bool output_ensure_buffer(struct wlr_output *output, return true; } + // If the compositor hasn't called wlr_output_init_render(), they will use + // their own logic to attach buffers + if (output->renderer == NULL) { + return true; + } + // If we're lighting up an output or changing its mode, make sure to // provide a new buffer bool needs_new_buffer = false; |