Allow fbCompositeSrc_x888x8x8888mmx when destination has alpha

Previously the check for this optimized function would only allow
the function to be called if the source and destination had
identical formats. But the function doesn't read the destination
alpha (if any) so can be used when it exists as well.

(Thanks to Jeff Muizelaar for pointing out this problem.)
This commit is contained in:
Carl Worth 2007-04-25 10:36:12 -07:00
parent 72b812be8c
commit fea5336e2d

View file

@ -1642,8 +1642,14 @@ pixman_composite (pixman_operator_t op,
break;
#ifdef USE_MMX
case PICT_x8r8g8b8:
if ((pDst->format_code == PICT_a8r8g8b8 ||
pDst->format_code == PICT_x8r8g8b8) &&
pMask->format_code == PICT_a8 && fbHaveMMX())
func = fbCompositeSrc_x888x8x8888mmx;
break;
case PICT_x8b8g8r8:
if (pDst->format_code == pSrc->format_code &&
if ((pDst->format_code == PICT_a8b8g8r8 ||
pDst->format_code == PICT_x8b8g8r8) &&
pMask->format_code == PICT_a8 && fbHaveMMX())
func = fbCompositeSrc_x888x8x8888mmx;
break;