mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 02:19:49 +01:00
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.
This commit is contained in:
parent
7d8284ec10
commit
e92b272616
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue