From 5a2509ffb1e0cf566727d6b2cc3d447d39691679 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Thu, 11 Jan 2024 14:55:49 +0100 Subject: [PATCH] backend-drm: Don't force non-opaque overlays to primary plane If a view is non-opaque - such as an overlay over a video - we shouldn't force it to be on the primary plane, as that's where the underlying content should be placed, such as the video view. dc0de9ee already mentioned: "This check should be changed in future to only filter for opaque views, but that's for another time." Adding "Fixes" at this is arguably a bug fix: Fixes: dc0de9ee (backend-drm: Move overlay vs. primary plane check earlier) Fixes: 2538aacc (backend-drm: Construct a zpos candidate list of planes) Signed-off-by: Robert Mader --- libweston/backend-drm/state-propose.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libweston/backend-drm/state-propose.c b/libweston/backend-drm/state-propose.c index 18a6d628..2b42e3dc 100644 --- a/libweston/backend-drm/state-propose.c +++ b/libweston/backend-drm/state-propose.c @@ -508,6 +508,7 @@ drm_output_find_plane_for_view(struct drm_output_state *state, /* if the view covers the whole output, put it in the * scanout plane, not overlay */ if (view_matches_entire_output && + weston_view_is_opaque(ev, &ev->transform.boundingbox) && !scanout_has_view_assigned) continue; break;