From 64c938f5d6838eb7579f1e378c736541edcae63d Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Thu, 16 Oct 2025 11:33:11 +0200 Subject: [PATCH] backend-drm: Use paint_node->draw_solid in more cases In order to streamline our checks and to make it easier to ensure that we replace paint nodes with solid placeholders correctly. Fix the failure reason in one case while on it. Signed-off-by: Robert Mader --- libweston/backend-drm/state-propose.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libweston/backend-drm/state-propose.c b/libweston/backend-drm/state-propose.c index d7093d043..4124713dc 100644 --- a/libweston/backend-drm/state-propose.c +++ b/libweston/backend-drm/state-propose.c @@ -547,9 +547,9 @@ drm_output_find_plane_for_view(struct drm_output_state *state, } buffer = ev->surface->buffer_ref.buffer; - if (buffer->type == WESTON_BUFFER_SOLID) { + if (pnode->draw_solid) { pnode->try_view_on_plane_failure_reasons |= - FAILURE_REASONS_BUFFER_TYPE; + FAILURE_REASONS_SOLID_SURFACE; } else if (buffer->type == WESTON_BUFFER_SHM) { try_pnode_on_cursor_plane(output, pnode); @@ -916,8 +916,7 @@ drm_output_propose_state(struct weston_output *output_base, * if it is fullscreen (i.e. we disable the primary plane), and * opaque (as it is only shown in the absence of any covering * plane, not as a replacement for the primary plane per se). */ - if (ev->surface->buffer_ref.buffer && - ev->surface->buffer_ref.buffer->type == WESTON_BUFFER_SOLID) + if (pnode->draw_solid) pnode->try_view_on_plane_failure_reasons |= FAILURE_REASONS_SOLID_SURFACE;