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 <m.olbrich@pengutronix.de>
dev
Michael Olbrich 2 years ago committed by Daniel Stone
parent 2badd284a5
commit 27d2a4cfab
  1. 4
      libweston/compositor.c

@ -3254,6 +3254,10 @@ weston_output_repaint(struct weston_output *output)
} else { } else {
wl_list_for_each(pnode, &output->paint_node_z_order_list, wl_list_for_each(pnode, &output->paint_node_z_order_list,
z_order_link) { 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); weston_view_move_to_plane(pnode->view, &ec->primary_plane);
pnode->view->psf_flags = 0; pnode->view->psf_flags = 0;
} }

Loading…
Cancel
Save