diff options
Diffstat (limited to 'pixman/pixman/pixman-region16.c')
-rw-r--r-- | pixman/pixman/pixman-region16.c | 46 |
1 files changed, 13 insertions, 33 deletions
diff --git a/pixman/pixman/pixman-region16.c b/pixman/pixman/pixman-region16.c index acee0946b..46f5e26ea 100644 --- a/pixman/pixman/pixman-region16.c +++ b/pixman/pixman/pixman-region16.c @@ -42,42 +42,22 @@ typedef struct { #define PREFIX(x) pixman_region##x +#include "pixman-region.c" + +/* This function exists only to make it possible to preserve the X ABI - + * it should go away at first opportunity. + * + * The problem is that the X ABI exports the three structs and has used + * them through macros. So the X server calls this function with + * the addresses of those structs which makes the existing code continue to + * work. + */ PIXMAN_EXPORT void pixman_region_set_static_pointers (pixman_box16_t *empty_box, pixman_region16_data_t *empty_data, pixman_region16_data_t *broken_data) { - pixman_region_internal_set_static_pointers (empty_box, empty_data, broken_data); -} - -pixman_bool_t -pixman_region16_copy_from_region32 (pixman_region16_t *dst, - pixman_region32_t *src) -{ - int n_boxes, i; - pixman_box32_t *boxes32; - pixman_box16_t *boxes16; - pixman_bool_t retval; - - boxes32 = pixman_region32_rectangles (src, &n_boxes); - - boxes16 = pixman_malloc_ab (n_boxes, sizeof (pixman_box16_t)); - - if (!boxes16) - return FALSE; - - for (i = 0; i < n_boxes; ++i) - { - boxes16[i].x1 = boxes32[i].x1; - boxes16[i].y1 = boxes32[i].y1; - boxes16[i].x2 = boxes32[i].x2; - boxes16[i].y2 = boxes32[i].y2; - } - - pixman_region_fini (dst); - retval = pixman_region_init_rects (dst, boxes16, n_boxes); - free (boxes16); - return retval; + pixman_region_empty_box = empty_box; + pixman_region_empty_data = empty_data; + pixman_broken_data = broken_data; } - -#include "pixman-region.c" |