From ab6c6429df9c0519320359d1e9072b2626beabd1 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Mon, 10 Jul 2023 11:45:27 -0500 Subject: [PATCH] libweston: Post damage intentionally when remapping a subsurface view We used to do this through a byzantine path involving the view's plane transitioning from NULL to primary - but that doesn't work very well when we want to track the plane in the paint node, because the paint node will never have a NULL plane state. This can be removed later when we track damage on paint nodes. Signed-off-by: Derek Foreman --- libweston/compositor.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libweston/compositor.c b/libweston/compositor.c index 25d917f4..72f6b933 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -3109,6 +3109,15 @@ view_list_add_subsurface_view(struct weston_compositor *compositor, assert(view); + /* We used to mysteriously depend on the view->plane transition + * from NULL to primary to generate damage when a view that was + * unmapped became remapped. Forcing damage here is a little + * more obvious. + * + * We can't use weston_view_damage_below() because the clip region + * isn't correct until after we render, and by then it's too late. + */ + weston_surface_damage(view->surface); weston_view_update_transform(view); view->is_mapped = true;