mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 10:48:05 +02:00
compositor: re-order paint node placeholder checks
Doing these in the wrong order breaks content protection, and breaks placing direct-display paint nodes on underlays. Fixes:827e2276("gl-renderer: Draw holes on primary plane for the view on underlay") Signed-off-by: Derek Foreman <derek.foreman@collabora.com> (cherry picked from commit53189ebb89)
This commit is contained in:
parent
af871d82ef
commit
8eb0ff8a19
1 changed files with 13 additions and 7 deletions
|
|
@ -217,14 +217,22 @@ maybe_replace_paint_node(struct weston_paint_node *pnode)
|
|||
|
||||
pnode->draw_solid = false;
|
||||
pnode->is_direct = false;
|
||||
if (buffer->direct_display) {
|
||||
/* Check for content protection first, as we should always prevent
|
||||
* the rendering of protected content.
|
||||
*/
|
||||
if (surface->protection_mode ==
|
||||
WESTON_SURFACE_PROTECTION_MODE_ENFORCED &&
|
||||
(recording_censor || unprotected_censor)) {
|
||||
pnode->draw_solid = true;
|
||||
pnode->is_direct = true;
|
||||
pnode->is_fully_opaque = true;
|
||||
pnode->is_fully_blended = false;
|
||||
pnode->solid = placeholder_color;
|
||||
return;
|
||||
}
|
||||
/* Check if we need a hole before we check direct-display, otherwise
|
||||
* we'll end up drawing an opaque placeholder over direct_display
|
||||
* paint nodes when we place them on underlays.
|
||||
*/
|
||||
if (pnode->need_hole) {
|
||||
pnode->draw_solid = true;
|
||||
pnode->is_fully_opaque = true;
|
||||
|
|
@ -234,15 +242,13 @@ maybe_replace_paint_node(struct weston_paint_node *pnode)
|
|||
};
|
||||
return;
|
||||
}
|
||||
if (surface->protection_mode !=
|
||||
WESTON_SURFACE_PROTECTION_MODE_ENFORCED)
|
||||
return;
|
||||
|
||||
if (recording_censor || unprotected_censor) {
|
||||
if (buffer->direct_display) {
|
||||
pnode->draw_solid = true;
|
||||
pnode->is_direct = true;
|
||||
pnode->is_fully_opaque = true;
|
||||
pnode->is_fully_blended = false;
|
||||
pnode->solid = placeholder_color;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue