From 5a6ca4794bfd96026937cd8736a8bcb723b2b2ff Mon Sep 17 00:00:00 2001 From: Mathias Hasselmann Date: Wed, 14 Mar 2007 00:55:46 +0100 Subject: [PATCH] Replace pixman_region_create_simple by pixman_region_init --- pixman/src/ictrap.c | 14 +++++++------- pixman/src/pixman.h | 3 --- pixman/src/pixregion.c | 13 +------------ 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/pixman/src/ictrap.c b/pixman/src/ictrap.c index 3e0186a35..7a90cf007 100644 --- a/pixman/src/ictrap.c +++ b/pixman/src/ictrap.c @@ -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; diff --git a/pixman/src/pixman.h b/pixman/src/pixman.h index df343b26f..f5c568408 100644 --- a/pixman/src/pixman.h +++ b/pixman/src/pixman.h @@ -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 diff --git a/pixman/src/pixregion.c b/pixman/src/pixregion.c index e408eaf51..08f48c735 100644 --- a/pixman/src/pixregion.c +++ b/pixman/src/pixregion.c @@ -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; }