From fea5336e2db201be69256ef1bafd418fee98a21e Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 25 Apr 2007 10:36:12 -0700 Subject: [PATCH] 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.) --- pixman/src/fbpict.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pixman/src/fbpict.c b/pixman/src/fbpict.c index 25352527f..03f75f102 100644 --- a/pixman/src/fbpict.c +++ b/pixman/src/fbpict.c @@ -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;