From 0def955a48903e043f458e9dee7599ffb6b946cb Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Fri, 3 Nov 2023 10:31:07 -0500 Subject: [PATCH] libweston: Don't set VISIBILITY_DIRTY on non-primary planes VISIBILITY_DIRTY is used to apply damage to the plane, but that doesn't make sense for non-primary planes. For example, we don't want moving the cursor to result in damage being registered on the cursor plane. Signed-off-by: Derek Foreman --- libweston/compositor.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/libweston/compositor.c b/libweston/compositor.c index 30141af5..22df18e9 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -119,9 +119,18 @@ weston_view_dirty_paint_nodes(struct weston_view *view) wl_list_for_each(node, &view->paint_node_list, view_link) { assert(node->surface == view->surface); + node->status |= PAINT_NODE_VIEW_DIRTY; - node->status |= PAINT_NODE_VIEW_DIRTY | - PAINT_NODE_VISIBILITY_DIRTY; + /* We currently only place single surfaces on non-primary + * planes, and those planes are positioned within the + * scene graph based on geometry. + * + * That means we don't have to propagate damage to the + * plane for visibility changes, so don't set that + * bit here. + */ + if (node->plane == &node->output->primary_plane) + node->status |= PAINT_NODE_VISIBILITY_DIRTY; } }