compositor: Add a WESTON_PAINT_NODE_BUFFER_PARAMS_DIRTY

This already existed for surface, so it is trivial to add.

This will let the upcoming plane state reuse code notice a format change.

This is handy because a client might respond to dmabuf feedback by changing
formats, with the expectation that doing so would land content on a plane.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2025-10-20 14:59:48 -05:00 committed by Daniel Stone
parent 008884f289
commit 6070dd8069
3 changed files with 6 additions and 2 deletions

View file

@ -309,7 +309,8 @@ enum weston_paint_node_status {
WESTON_PAINT_NODE_VISIBILITY_DIRTY = 1 << 2,
WESTON_PAINT_NODE_PLANE_DIRTY = 1 << 3,
WESTON_PAINT_NODE_BUFFER_DIRTY = 1 << 4,
WESTON_PAINT_NODE_ALL_DIRTY = (1 << 5) - 1,
WESTON_PAINT_NODE_BUFFER_PARAMS_DIRTY = 1 << 5,
WESTON_PAINT_NODE_ALL_DIRTY = (1 << 6) - 1,
};

View file

@ -265,7 +265,8 @@ paint_node_update_early(struct weston_paint_node *pnode)
pnode->output->paint_node_changes |= pnode->status;
pnode->status &= ~(WESTON_PAINT_NODE_VIEW_DIRTY | \
WESTON_PAINT_NODE_OUTPUT_DIRTY |
WESTON_PAINT_NODE_BUFFER_DIRTY);
WESTON_PAINT_NODE_BUFFER_DIRTY |
WESTON_PAINT_NODE_BUFFER_PARAMS_DIRTY);
}
/* This is for validating a paint node after early update, assign planes,

View file

@ -167,6 +167,8 @@ weston_surface_attach(struct weston_surface *surface,
buffer->format_modifier != old_buffer->format_modifier) {
surface->is_opaque = pixel_format_is_opaque(buffer->pixel_format);
status |= WESTON_SURFACE_DIRTY_BUFFER_PARAMS;
weston_surface_dirty_paint_nodes(surface,
WESTON_PAINT_NODE_BUFFER_PARAMS_DIRTY);
}
status |= WESTON_SURFACE_DIRTY_BUFFER;