From 2eee164f24ee24de5c880d037fedf8eb4fa8f452 Mon Sep 17 00:00:00 2001 From: Leandro Ribeiro Date: Thu, 28 Nov 2019 23:04:46 -0300 Subject: [PATCH] libweston: remove previous_damage from struct weston_output The member previous_damage from struct weston_output is no longer necessary. First, stop calling init, fini and copying output_damage to it. Then remove it from struct weston_output. Signed-off-by: Leandro Ribeiro --- include/libweston/libweston.h | 2 -- libweston/compositor.c | 6 ------ libweston/pixman-renderer.c | 1 - libweston/renderer-gl/gl-renderer.c | 1 - 4 files changed, 10 deletions(-) diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h index 6b5cc4bf..dc54b170 100644 --- a/include/libweston/libweston.h +++ b/include/libweston/libweston.h @@ -249,8 +249,6 @@ struct weston_output { /** Output area in global coordinates, simple rect */ pixman_region32_t region; - pixman_region32_t previous_damage; - /** True if damage has occurred since the last repaint for this output; * if set, a repaint will eventually occur. */ bool repaint_needed; diff --git a/libweston/compositor.c b/libweston/compositor.c index 72a2905e..dbc64927 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -153,7 +153,6 @@ weston_mode_switch_finish(struct weston_output *output, /* Update output region and transformation matrix */ weston_output_transform_scale_init(output, output->transform, output->current_scale); - pixman_region32_init(&output->previous_damage); pixman_region32_init_rect(&output->region, output->x, output->y, output->width, output->height); @@ -5779,9 +5778,6 @@ weston_output_init_geometry(struct weston_output *output, int x, int y) output->x = x; output->y = y; - pixman_region32_fini(&output->previous_damage); - pixman_region32_init(&output->previous_damage); - pixman_region32_fini(&output->region); pixman_region32_init_rect(&output->region, x, y, output->width, @@ -6122,7 +6118,6 @@ weston_output_init(struct weston_output *output, /* Can't use -1 on uint32_t and 0 is valid enum value */ output->transform = UINT32_MAX; - pixman_region32_init(&output->previous_damage); pixman_region32_init(&output->region); wl_list_init(&output->mode_list); } @@ -6434,7 +6429,6 @@ weston_output_release(struct weston_output *output) weston_compositor_remove_output(output); pixman_region32_fini(&output->region); - pixman_region32_fini(&output->previous_damage); wl_list_remove(&output->link); wl_list_for_each_safe(head, tmp, &output->head_list, output_link) diff --git a/libweston/pixman-renderer.c b/libweston/pixman-renderer.c index 378845d0..2d70aa47 100644 --- a/libweston/pixman-renderer.c +++ b/libweston/pixman-renderer.c @@ -579,7 +579,6 @@ pixman_renderer_repaint_output(struct weston_output *output, } pixman_region32_fini(&hw_damage); - pixman_region32_copy(&output->previous_damage, output_damage); wl_signal_emit(&output->frame_signal, output); /* Actual flip should be done by caller */ diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c index 14c5f8b1..25e212b9 100644 --- a/libweston/renderer-gl/gl-renderer.c +++ b/libweston/renderer-gl/gl-renderer.c @@ -1473,7 +1473,6 @@ gl_renderer_repaint_output(struct weston_output *output, draw_output_borders(output, border_status); - pixman_region32_copy(&output->previous_damage, output_damage); wl_signal_emit(&output->frame_signal, output); go->end_render_sync = create_render_sync(gr);