aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-04-23 20:16:08 +0300
committerDrew DeVault <sir@cmpwn.com>2019-04-23 14:34:30 -0600
commit5e6766a165bd4bc71f1dc24c4348f7be0f020ddd (patch)
treed655444e6a26c639042dd5224f7b177ab8a46f34 /rootston
parent31dcecbfa99422d4f24c65bbfb54a517210e6ba6 (diff)
downloadwlroots-5e6766a165bd4bc71f1dc24c4348f7be0f020ddd.tar.xz
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.
Diffstat (limited to 'rootston')
-rw-r--r--rootston/render.c8
1 files changed, 4 insertions, 4 deletions
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);
}