mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 01:28:23 +02:00
gl-renderer: Fix memory leak for mixed opaque/blended views
transform_damage() returns an allocated set of quads; if a surface had both opaque and blended regions, we were overwriting the previously-allocated set of quads for the blended region. Luckily, transform_damage() doesn't need to be called twice anyway, so we can fix this by only calling it once in the first case. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
04a85ab71c
commit
d46135705e
1 changed files with 2 additions and 4 deletions
|
|
@ -2475,9 +2475,9 @@ draw_paint_node(struct weston_paint_node *pnode,
|
|||
&surface_opaque);
|
||||
|
||||
gl_log_paint_node_bbox_and_region(gr, "repaint region", &repaint);
|
||||
transform_damage(pnode, &repaint, &quads, &nquads);
|
||||
|
||||
if (pixman_region32_not_empty(&surface_opaque)) {
|
||||
transform_damage(pnode, &repaint, &quads, &nquads);
|
||||
gl_log_paint_node_bbox_and_region(gr, "opaque region", &surface_opaque);
|
||||
repaint_region(gr, pnode, quads, nquads, &surface_opaque,
|
||||
&sconf, true);
|
||||
|
|
@ -2485,15 +2485,13 @@ draw_paint_node(struct weston_paint_node *pnode,
|
|||
}
|
||||
|
||||
if (pixman_region32_not_empty(&surface_blend)) {
|
||||
transform_damage(pnode, &repaint, &quads, &nquads);
|
||||
gl_log_paint_node_bbox_and_region(gr, "blended region", &surface_blend);
|
||||
repaint_region(gr, pnode, quads, nquads, &surface_blend, &sconf,
|
||||
false);
|
||||
gs->used_in_output_repaint = true;
|
||||
}
|
||||
|
||||
if (quads)
|
||||
free(quads);
|
||||
free(quads);
|
||||
|
||||
pixman_region32_fini(&surface_blend);
|
||||
pixman_region32_fini(&surface_opaque);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue