From d7f426806d25a9cea93a4c43a3f23e7ae9d67383 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Tue, 19 Jun 2007 10:46:36 -0400 Subject: [PATCH] Smplify the 1x1r optimization for the general compositing and fix the 1xn and nx1 cases. --- pixman/pixman-pict.c | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/pixman/pixman-pict.c b/pixman/pixman-pict.c index ddd81f4..57bd7d6 100644 --- a/pixman/pixman-pict.c +++ b/pixman/pixman-pict.c @@ -1857,30 +1857,25 @@ pixman_image_composite (pixman_op_t op, func = pixman_image_composite_rect; /* CompositeGeneral optimizes 1x1 repeating images itself */ - if (pSrc->type == BITS) + if (pSrc->type == BITS && + pSrc->bits.width == 1 && pSrc->bits.height == 1) { - srcRepeat = - pSrc->common.repeat == PIXMAN_REPEAT_NORMAL && - !pSrc->common.transform && - pSrc->bits.width != 1 && - pSrc->bits.height != 1; + srcRepeat = FALSE; } - - if (pMask && pMask->type == BITS) + + if (pMask && pMask->type == BITS && + pMask->bits.width == 1 && pMask->bits.height == 1) { - maskRepeat = - pMask->common.repeat == PIXMAN_REPEAT_NORMAL && - !pMask->common.transform && - pMask->bits.width != 1 && - pMask->bits.height != 1; + maskRepeat = FALSE; } - } - /* if we are transforming, we handle repeats in fbFetchTransformed */ - if (srcTransform) - srcRepeat = FALSE; - if (maskTransform) - maskRepeat = FALSE; + /* if we are transforming, repeats are handled in fbFetchTransformed */ + if (srcTransform) + srcRepeat = FALSE; + + if (maskTransform) + maskTransform = FALSE; + } pixman_walk_composite_region (op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height, -- 2.7.4