From 99eff1276a5eeb312d2ba5a6b915dc52ddcc2533 Mon Sep 17 00:00:00 2001 From: Chao Guo Date: Mon, 17 Jun 2024 16:39:40 +0900 Subject: [PATCH] compositor: Consider punch holes when flushing damage Signed-off-by: Chao Guo --- libweston/compositor.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libweston/compositor.c b/libweston/compositor.c index aa11ec8ec..9795d08c6 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -3601,8 +3601,13 @@ weston_output_flush_damage_for_plane(struct weston_output *output, wl_list_for_each(pnode, &output->paint_node_z_order_list, z_order_link) { - if (pnode->plane != plane) - continue; + if (pnode->plane != plane) { + if (plane != &output->primary_plane) + continue; + /* For primary plane, add the damage of nodes need holes. */ + if (!pnode->need_hole) + continue; + } changed = true; /* We can safely clip paint node damage to visible region