From: Søren Sandmann Pedersen Date: Tue, 19 Jun 2007 14:46:36 +0000 (-0400) Subject: Smplify the 1x1r optimization for the general compositing and fix the X-Git-Tag: pixman-0.9.4~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d7f426806d25a9cea93a4c43a3f23e7ae9d67383;p=platform%2Fupstream%2Fpixman.git Smplify the 1x1r optimization for the general compositing and fix the 1xn and nx1 cases. --- 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,