From 62e9b4d6cfcbc10046539b8e9643691bb02bea39 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann?= Date: Mon, 9 Jun 2008 00:00:07 -0400 Subject: [PATCH] Export pixman_compute_composite_region32() and use it in walk_region --- TODO | 2 ++ pixman/pixman-compute-region.c | 2 +- pixman/pixman-pict.c | 16 ++++++++-------- pixman/pixman-private.h | 13 +++++++++++++ 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/TODO b/TODO index 5acadf3..4f8f9c4 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,5 @@ + - Behdad's MMX issue - see list + - SSE 2 issues: - Commented-out uses of fbCompositeCopyAreasse2() diff --git a/pixman/pixman-compute-region.c b/pixman/pixman-compute-region.c index fa0dd99..a93cee0 100644 --- a/pixman/pixman-compute-region.c +++ b/pixman/pixman-compute-region.c @@ -123,7 +123,7 @@ miClipPictureSrc (pixman_region32_t * pRegion, * an allocation failure, but rendering ignores those anyways. */ -static pixman_bool_t +pixman_bool_t pixman_compute_composite_region32 (pixman_region32_t * pRegion, pixman_image_t * pSrc, pixman_image_t * pMask, diff --git a/pixman/pixman-pict.c b/pixman/pixman-pict.c index 127e257..7c88a65 100644 --- a/pixman/pixman-pict.c +++ b/pixman/pixman-pict.c @@ -1187,22 +1187,22 @@ pixman_walk_composite_region (pixman_op_t op, CompositeFunc compositeRect) { int n; - const pixman_box16_t *pbox; + const pixman_box32_t *pbox; int w, h, w_this, h_this; int x_msk, y_msk, x_src, y_src, x_dst, y_dst; - pixman_region16_t reg; - pixman_region16_t *region; + pixman_region32_t reg; + pixman_region32_t *region; - pixman_region_init (®); - if (!pixman_compute_composite_region (®, pSrc, pMask, pDst, - xSrc, ySrc, xMask, yMask, xDst, yDst, width, height)) + pixman_region32_init (®); + if (!pixman_compute_composite_region32 (®, pSrc, pMask, pDst, + xSrc, ySrc, xMask, yMask, xDst, yDst, width, height)) { return; } region = ® - pbox = pixman_region_rectangles (region, &n); + pbox = pixman_region32_rectangles (region, &n); while (n--) { h = pbox->y2 - pbox->y1; @@ -1258,7 +1258,7 @@ pixman_walk_composite_region (pixman_op_t op, } pbox++; } - pixman_region_fini (®); + pixman_region32_fini (®); } static void diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h index 951632c..0ea0cb3 100644 --- a/pixman/pixman-private.h +++ b/pixman/pixman-private.h @@ -686,6 +686,19 @@ pixman_image_is_opaque(pixman_image_t *image); pixman_bool_t pixman_image_can_get_solid (pixman_image_t *image); +pixman_bool_t +pixman_compute_composite_region32 (pixman_region32_t * pRegion, + pixman_image_t * pSrc, + pixman_image_t * pMask, + pixman_image_t * pDst, + int16_t xSrc, + int16_t ySrc, + int16_t xMask, + int16_t yMask, + int16_t xDst, + int16_t yDst, + uint16_t width, + uint16_t height); /* GCC visibility */ #if defined(__GNUC__) && __GNUC__ >= 4 -- 2.7.4