mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-04-26 19:30:45 +02:00
backend-drm: Fix visibility calculation
Between assign_planes() and pnode_update_late(), the pnode's plane may not yet be up to date. This leads to the visible region being incorrectly calculated for paint nodes beneath a paint node that changes planes. Their visible regions will still contain a cut out for the node that no longer occludes them. However, we place damage on nodes beneath a node that changes planes in order to redraw the region beneath a node that moves from the primary to non-primary plane. The gl-renderer clips to a paint node's visible region when rendering it, so this accidental cut-out masks away all the damage and leaves us with a mess. Fix this by using the correct plane in the visibility calculation. Fixes #821 Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
176a413ef0
commit
209b7eb56a
1 changed files with 3 additions and 2 deletions
|
|
@ -3108,7 +3108,7 @@ static void
|
|||
output_update_visibility(struct weston_output *output)
|
||||
{
|
||||
struct weston_compositor *ec = output->compositor;
|
||||
struct weston_plane *plane;
|
||||
struct weston_plane *plane, *pnode_plane;
|
||||
struct weston_paint_node *pnode;
|
||||
pixman_region32_t opaque, clip;
|
||||
|
||||
|
|
@ -3119,7 +3119,8 @@ output_update_visibility(struct weston_output *output)
|
|||
|
||||
wl_list_for_each(pnode, &output->paint_node_z_order_list,
|
||||
z_order_link) {
|
||||
if (pnode->plane != plane)
|
||||
pnode_plane = pnode->plane_next ?: pnode->plane;
|
||||
if (pnode_plane != plane)
|
||||
continue;
|
||||
|
||||
view_update_visible(pnode->view, &opaque);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue