Commit 52566aa2 authored by Tomohito Esaki's avatar Tomohito Esaki

libweston: skip view which doesn't touch the output, in compositor_accumulate_damage()

Since repaint is called for each output, a view which doesn't touch the
output need to be skipped in compositor_accumulate_damage().
parent fc2c1809
Pipeline #61271 passed with stages
in 5 minutes and 1 second
......@@ -2405,7 +2405,8 @@ view_accumulate_damage(struct weston_view *view,
}
static void
compositor_accumulate_damage(struct weston_compositor *ec)
compositor_accumulate_damage(struct weston_compositor *ec,
struct weston_output *output)
{
struct weston_plane *plane;
struct weston_view *ev;
......@@ -2419,6 +2420,8 @@ compositor_accumulate_damage(struct weston_compositor *ec)
pixman_region32_init(&opaque);
wl_list_for_each(ev, &ec->view_list, link) {
if (!(ev->output_mask & (1u << output->id)))
continue;
if (ev->plane != plane)
continue;
......@@ -2431,10 +2434,15 @@ compositor_accumulate_damage(struct weston_compositor *ec)
pixman_region32_fini(&clip);
wl_list_for_each(ev, &ec->view_list, link)
wl_list_for_each(ev, &ec->view_list, link) {
if (!(ev->output_mask & (1u << output->id)))
continue;
ev->surface->touched = false;
}
wl_list_for_each(ev, &ec->view_list, link) {
if (!(ev->output_mask & (1u << output->id)))
continue;
if (ev->surface->touched)
continue;
ev->surface->touched = true;
......@@ -2674,7 +2682,7 @@ weston_output_repaint(struct weston_output *output, void *repaint_data)
}
}
compositor_accumulate_damage(ec);
compositor_accumulate_damage(ec, output);
pixman_region32_init(&output_damage);
pixman_region32_intersect(&output_damage,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment