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 <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2023-07-10 11:45:27 -05:00
parent 8d00cf7a96
commit ab6c6429df

View file

@ -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;