mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
wlr_scene: Add support for custom swapchains
This commit is contained in:
parent
239354d644
commit
8da93e5936
2 changed files with 15 additions and 3 deletions
|
|
@ -1803,11 +1803,16 @@ bool wlr_scene_output_build_state(struct wlr_scene_output *scene_output,
|
|||
wlr_damage_ring_set_bounds(&scene_output->damage_ring,
|
||||
render_data.trans_width, render_data.trans_height);
|
||||
|
||||
if (!wlr_output_configure_primary_swapchain(output, state, &output->swapchain)) {
|
||||
return false;
|
||||
struct wlr_swapchain *swapchain = options->swapchain;
|
||||
if (!swapchain) {
|
||||
if (!wlr_output_configure_primary_swapchain(output, state, &output->swapchain)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
swapchain = output->swapchain;
|
||||
}
|
||||
|
||||
struct wlr_buffer *buffer = wlr_swapchain_acquire(output->swapchain, NULL);
|
||||
struct wlr_buffer *buffer = wlr_swapchain_acquire(swapchain, NULL);
|
||||
if (buffer == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue