libweston: Clip damage to paint node visible region
commit79212ba9ad
fixed a bug by introducing a new one. Before that point we could clip paint node damage to stale visibility data. After that point we post damage for occluded views, leading to large amounts of pointless drawing. Add back the clip to visible region, in weston_output_flush_damage_for_plane(), where we have up to date visibility region information. fixes79212ba9ad
Signed-off-by: Derek Foreman <derek.foreman@collabora.com> (cherry picked from commite74f2897b9
)
This commit is contained in:
parent
17a9834892
commit
cebcf8ff7c
|
@ -3378,6 +3378,12 @@ weston_output_flush_damage_for_plane(struct weston_output *output,
|
||||||
continue;
|
continue;
|
||||||
changed = true;
|
changed = true;
|
||||||
|
|
||||||
|
/* We can safely clip paint node damage to visible region
|
||||||
|
* here, as we're only dealing with nodes on this output,
|
||||||
|
* and the visibility regions for paint nodes on this
|
||||||
|
* output are up to date.
|
||||||
|
*/
|
||||||
|
pixman_region32_intersect(&pnode->damage, &pnode->damage, &pnode->visible);
|
||||||
pixman_region32_union(damage, damage, &pnode->damage);
|
pixman_region32_union(damage, damage, &pnode->damage);
|
||||||
pixman_region32_clear(&pnode->damage);
|
pixman_region32_clear(&pnode->damage);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue