From 27d2a4cfabde5fe17ba09f2083642b43e1ececa0 Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Wed, 6 Jul 2022 13:35:12 +0200 Subject: [PATCH] libweston: don't reset the plane for views from other outputs The paint_node_z_order_list contains all views, not just the ones visible on the current output. So all views are moved to the primary plane when one output does not support planes. This will be relevant with multiple backends: When an output without plane support is rendered then the views of all other outputs are removed from the current planes and the corresponding outputs will be repainted unnecessarily. So only reset the plane if the view is actually on the current output. Signed-off-by: Michael Olbrich --- libweston/compositor.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libweston/compositor.c b/libweston/compositor.c index 2285e3f1..abe75bff 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -3254,6 +3254,10 @@ weston_output_repaint(struct weston_output *output) } else { wl_list_for_each(pnode, &output->paint_node_z_order_list, z_order_link) { + /* TODO: turn this into assert once z_order_list is pruned. */ + if ((pnode->view->output_mask & (1u << output->id)) == 0) + continue; + weston_view_move_to_plane(pnode->view, &ec->primary_plane); pnode->view->psf_flags = 0; }