compositor: Validate that paint node holes have planes

If the backend says a hole is necessary, it must assign a plane for it.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2025-10-15 13:21:17 -05:00
parent 62e76ee5fb
commit 992ab893f9

View file

@ -275,6 +275,11 @@ paint_node_validate_ready(struct weston_paint_node *pnode)
struct weston_compositor *comp = pnode->surface->compositor;
struct weston_output *output = pnode->output;
/* A punch hole must have a plane assigned */
if (pnode->need_hole)
weston_assert_true(comp,
pnode->plane != &output->primary_plane);
/* A censored pnode must not have a plane assigned, and must be
* rendered solid, or we could leak protected content.
*/