diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2011-12-09 03:59:04 -0500 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2011-12-13 14:50:40 -0500 |
commit | 9db980551518a09069b8ade34743238329a36661 (patch) | |
tree | e3abf7583b8ef26b66d94de021ab458cb64809d6 /pixman/pixman-region.c | |
parent | 6b9d6a91ed4a85f27d7e5824ce2a63f37876e937 (diff) |
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);
Diffstat (limited to 'pixman/pixman-region.c')
-rw-r--r-- | pixman/pixman-region.c | 10 |
1 files changed, 10 insertions, 0 deletions
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, |