mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 07:38:22 +02:00
gl: use _cairo_gl_operand_copy to fix unblanced reference count
Use _cairo_gl_operand_copy to do the operand copy instead of by something like *operand = surface->operand. This would fix a crash introduced by operator-source test case, which forgot to do reference while copying operand but did dereference while destroying surface at combine_clip_as_traps(). Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> [ickle: drop the extra reference for the owned surface] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
f3ae830207
commit
9340fcd965
1 changed files with 2 additions and 2 deletions
|
|
@ -223,7 +223,7 @@ _cairo_gl_subsurface_operand_init (cairo_gl_operand_t *operand,
|
|||
* (unnormalized src -> unnormalized src) to
|
||||
* (unnormalized dst -> unnormalized src)
|
||||
*/
|
||||
*operand = surface->operand;
|
||||
_cairo_gl_operand_copy(operand, &surface->operand);
|
||||
|
||||
attributes = &operand->texture.attributes;
|
||||
attributes->matrix = src->base.matrix;
|
||||
|
|
@ -270,7 +270,7 @@ _cairo_gl_surface_operand_init (cairo_gl_operand_t *operand,
|
|||
if (unlikely (status))
|
||||
return status;
|
||||
|
||||
*operand = surface->operand;
|
||||
_cairo_gl_operand_copy(operand, &surface->operand);
|
||||
|
||||
attributes = &operand->texture.attributes;
|
||||
cairo_matrix_multiply (&attributes->matrix,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue