mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-06 21:20:25 +01:00
Replace pixman_region_create_simple by pixman_region_init
This commit is contained in:
parent
f9057f2752
commit
5a6ca4794b
3 changed files with 8 additions and 22 deletions
|
|
@ -116,7 +116,7 @@ pixman_composite_trapezoids (pixman_operator_t op,
|
|||
{
|
||||
pixman_image_t *image = NULL;
|
||||
pixman_box16_t traps_bounds, dst_bounds, bounds;
|
||||
pixman_region16_t *traps_region, *dst_region;
|
||||
pixman_region16_t traps_region, dst_region;
|
||||
int16_t xDst, yDst;
|
||||
int16_t xRel, yRel;
|
||||
pixman_format_t *format;
|
||||
|
|
@ -139,7 +139,7 @@ pixman_composite_trapezoids (pixman_operator_t op,
|
|||
|
||||
pixman_trapezoid_bounds (ntraps, traps, &traps_bounds);
|
||||
|
||||
traps_region = pixman_region_create_simple (&traps_bounds);
|
||||
pixman_region_init (&traps_region, &traps_bounds);
|
||||
|
||||
/* XXX: If the image has a clip region set, we should really be
|
||||
* fetching it here instead, but it looks like we don't yet expose
|
||||
|
|
@ -149,14 +149,14 @@ pixman_composite_trapezoids (pixman_operator_t op,
|
|||
dst_bounds.x2 = pixman_image_get_width (dst);
|
||||
dst_bounds.y2 = pixman_image_get_height (dst);
|
||||
|
||||
dst_region = pixman_region_create_simple (&dst_bounds);
|
||||
pixman_region_init (&dst_region, &dst_bounds);
|
||||
|
||||
pixman_region_intersect (traps_region, traps_region, dst_region);
|
||||
pixman_region_intersect (&traps_region, &traps_region, &dst_region);
|
||||
|
||||
bounds = *(pixman_region_extents (traps_region));
|
||||
bounds = *(pixman_region_extents (&traps_region));
|
||||
|
||||
pixman_region_destroy (traps_region);
|
||||
pixman_region_destroy (dst_region);
|
||||
pixman_region_uninit (&traps_region);
|
||||
pixman_region_uninit (&dst_region);
|
||||
|
||||
if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -134,9 +134,6 @@ typedef enum {
|
|||
pixman_private pixman_region16_t *
|
||||
pixman_region_create (void);
|
||||
|
||||
pixman_private pixman_region16_t *
|
||||
pixman_region_create_simple (pixman_box16_t *extents);
|
||||
|
||||
pixman_private void
|
||||
pixman_region_init(pixman_region16_t *region, pixman_box16_t *extents);
|
||||
pixman_private void
|
||||
|
|
|
|||
|
|
@ -292,17 +292,6 @@ pixman_region16_valid(reg)
|
|||
/* Create a new empty region */
|
||||
pixman_region16_t *
|
||||
pixman_region_create (void)
|
||||
{
|
||||
return pixman_region_create_simple (NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
* pixman_region_create_simple (extents)
|
||||
* This routine creates a pixman_region16_t for a simple
|
||||
* rectangular region.
|
||||
*****************************************************************/
|
||||
pixman_region16_t *
|
||||
pixman_region_create_simple (pixman_box16_t *extents)
|
||||
{
|
||||
pixman_region16_t *region;
|
||||
|
||||
|
|
@ -310,7 +299,7 @@ pixman_region_create_simple (pixman_box16_t *extents)
|
|||
if (region == NULL)
|
||||
return &pixman_brokenregion;
|
||||
|
||||
pixman_region_init (region, extents);
|
||||
pixman_region_init (region, NULL);
|
||||
|
||||
return region;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue