From: Søren Sandmann Pedersen Date: Fri, 9 Dec 2011 08:59:04 +0000 (-0500) Subject: region: Add pixman_region{,32}_clear() functions. X-Git-Tag: pixman-0.25.2~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9db980551518a09069b8ade34743238329a36661;p=platform%2Fupstream%2Fpixman.git region: Add pixman_region{,32}_clear() functions. These functions simply reset the region to empty. They are equivalent to pixman_region_fini (®ion); pixman_region_init (®ion); --- diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c index 80219c6..70c282d 100644 --- a/pixman/pixman-region.c +++ b/pixman/pixman-region.c @@ -2356,6 +2356,16 @@ PREFIX (_reset) (region_type_t *region, box_type_t *box) region->data = NULL; } +PIXMAN_EXPORT void +PREFIX (_clear) (region_type_t *region) +{ + GOOD (region); + FREE_DATA (region); + + region->extents = *pixman_region_empty_box; + region->data = pixman_region_empty_data; +} + /* box is "return" value */ PIXMAN_EXPORT int PREFIX (_contains_point) (region_type_t * region, diff --git a/pixman/pixman.h b/pixman/pixman.h index c57092a..18d9513 100644 --- a/pixman/pixman.h +++ b/pixman/pixman.h @@ -466,6 +466,7 @@ pixman_bool_t pixman_region_equal (pixman_region16_t *reg pixman_bool_t pixman_region_selfcheck (pixman_region16_t *region); void pixman_region_reset (pixman_region16_t *region, pixman_box16_t *box); +void pixman_region_clear (pixman_region16_t *region); /* * 32 bit regions */ @@ -560,6 +561,7 @@ pixman_bool_t pixman_region32_equal (pixman_region32_t *r pixman_bool_t pixman_region32_selfcheck (pixman_region32_t *region); void pixman_region32_reset (pixman_region32_t *region, pixman_box32_t *box); +void pixman_region32_clear (pixman_region32_t *region); /* Copy / Fill / Misc */