mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-08 22:20:22 +01:00
libpixman creates an A8 format object and sometimes forgets to destroy (when the bounds of the trapezoids are empty). Avoids creating the format object in that case.
reviewed by: cworth
This commit is contained in:
parent
27d9c575a7
commit
949daa1bc9
2 changed files with 17 additions and 5 deletions
|
|
@ -1,3 +1,12 @@
|
|||
2005-05-12 Keith Packard <keithp@keithp.com>
|
||||
|
||||
reviewed by: cworth
|
||||
|
||||
* src/ictrap.c: (pixman_composite_trapezoids):
|
||||
libpixman creates an A8 format object and sometimes forgets to
|
||||
destroy (when the bounds of the trapezoids are empty).
|
||||
Avoids creating the format object in that case.
|
||||
|
||||
2005-04-27 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* src/icimage.c (pixman_image_set_clip_region): Set
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $Id: ictrap.c,v 1.24 2005-03-04 15:53:09 cworth Exp $
|
||||
* $Id: ictrap.c,v 1.25 2005-05-13 03:25:07 keithp Exp $
|
||||
*
|
||||
* Copyright © 2002 Keith Packard
|
||||
*
|
||||
|
|
@ -139,10 +139,6 @@ pixman_composite_trapezoids (pixman_operator_t op,
|
|||
xDst = traps[0].left.p1.x >> 16;
|
||||
yDst = traps[0].left.p1.y >> 16;
|
||||
|
||||
format = pixman_format_create (PIXMAN_FORMAT_NAME_A8);
|
||||
if (!format)
|
||||
return;
|
||||
|
||||
pixman_trapezoid_bounds (ntraps, traps, &traps_bounds);
|
||||
|
||||
traps_region = pixman_region_create_simple (&traps_bounds);
|
||||
|
|
@ -167,11 +163,18 @@ pixman_composite_trapezoids (pixman_operator_t op,
|
|||
if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2)
|
||||
return;
|
||||
|
||||
format = pixman_format_create (PIXMAN_FORMAT_NAME_A8);
|
||||
if (!format)
|
||||
return;
|
||||
|
||||
image = IcCreateAlphaPicture (dst, format,
|
||||
bounds.x2 - bounds.x1,
|
||||
bounds.y2 - bounds.y1);
|
||||
if (!image)
|
||||
{
|
||||
pixman_format_destroy (format);
|
||||
return;
|
||||
}
|
||||
|
||||
for (; ntraps; ntraps--, traps++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue