From 5e6766a165bd4bc71f1dc24c4348f7be0f020ddd Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 23 Apr 2019 20:16:08 +0300 Subject: output-damage: refactor API wlr_output_damage_make_current has been renamed to wlr_output_damage_attach_render, since it's just a wrapper for wlr_output_attach_render. wlr_output_damage_swap_buffers has been removed completely. Instead, wlr_output_damage now listens to successful wlr_output commits and updates its internal state accordingly. --- rootston/render.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rootston') diff --git a/rootston/render.c b/rootston/render.c index 988f8de0..203e3ace 100644 --- a/rootston/render.c +++ b/rootston/render.c @@ -223,7 +223,7 @@ void output_render(struct roots_output *output) { bool needs_swap; pixman_region32_t damage; pixman_region32_init(&damage); - if (!wlr_output_damage_make_current(output->damage, &needs_swap, &damage)) { + if (!wlr_output_damage_attach_render(output->damage, &needs_swap, &damage)) { return; } @@ -310,7 +310,8 @@ renderer_end: wlr_output_transform_invert(wlr_output->transform); wlr_region_transform(&damage, &damage, transform, width, height); - if (!wlr_output_damage_swap_buffers(output->damage, &now, &damage)) { + wlr_output_set_damage(wlr_output, &damage); + if (!wlr_output_commit(wlr_output)) { goto damage_finish; } output->last_frame = desktop->last_frame = now; @@ -319,6 +320,5 @@ damage_finish: pixman_region32_fini(&damage); // Send frame done events to all surfaces - output_for_each_surface(output, surface_send_frame_done_iterator, - &now); + output_for_each_surface(output, surface_send_frame_done_iterator, &now); } -- cgit v1.2.3