aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/render.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-02-22 18:38:19 +0100
committerSimon Zeni <simon@bl4ckb0ne.ca>2023-02-22 13:37:44 -0500
commitc2ccc0c9d4726a2d1f23f1696c7b6aa0f6cb1a63 (patch)
treebd5c40f008c3f74dbe2c22ab047dc7b0721da51c /sway/desktop/render.c
parentd6cb4fa8de1e540c58b58d29d1520df296e46d1f (diff)
Move output commit out of output_render()
That way output_render() only does what it says on the tin.
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r--sway/desktop/render.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index dedaa967..a4d633e0 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -1029,8 +1029,7 @@ static void render_seatops(struct sway_output *output,
}
}
-void output_render(struct sway_output *output, struct timespec *when,
- pixman_region32_t *damage) {
+void output_render(struct sway_output *output, pixman_region32_t *damage) {
struct wlr_output *wlr_output = output->wlr_output;
struct wlr_renderer *renderer = output->server->renderer;
@@ -1184,30 +1183,4 @@ renderer_end:
wlr_renderer_scissor(renderer, NULL);
wlr_output_render_software_cursors(wlr_output, damage);
wlr_renderer_end(renderer);
-
- int width, height;
- wlr_output_transformed_resolution(wlr_output, &width, &height);
-
- pixman_region32_t frame_damage;
- pixman_region32_init(&frame_damage);
-
- enum wl_output_transform transform =
- wlr_output_transform_invert(wlr_output->transform);
- wlr_region_transform(&frame_damage, &output->damage_ring.current,
- transform, width, height);
-
- if (debug.damage != DAMAGE_DEFAULT) {
- pixman_region32_union_rect(&frame_damage, &frame_damage,
- 0, 0, wlr_output->width, wlr_output->height);
- }
-
- wlr_output_set_damage(wlr_output, &frame_damage);
- pixman_region32_fini(&frame_damage);
-
- if (!wlr_output_commit(wlr_output)) {
- return;
- }
-
- wlr_damage_ring_rotate(&output->damage_ring);
- output->last_frame = *when;
}