Pixman merge
Make sure fbCompositeSrc_x888x8x8888mmx and fbCompositeSrc_8888x8x8888mmx are used when possible.
This commit is contained in:
parent
3571b8e65b
commit
a54ef54db1
77
fb/fbpict.c
77
fb/fbpict.c
|
@ -1647,7 +1647,7 @@ fbComposite (CARD8 op,
|
||||||
if (func != fbCompositeGeneral)
|
if (func != fbCompositeGeneral)
|
||||||
srcRepeat = FALSE;
|
srcRepeat = FALSE;
|
||||||
}
|
}
|
||||||
else if (! srcRepeat) /* has mask and non-repeating source */
|
else if (!srcRepeat) /* has mask and non-repeating source */
|
||||||
{
|
{
|
||||||
if (pSrc->pDrawable == pMask->pDrawable &&
|
if (pSrc->pDrawable == pMask->pDrawable &&
|
||||||
xSrc == xMask && ySrc == yMask &&
|
xSrc == xMask && ySrc == yMask &&
|
||||||
|
@ -1712,44 +1712,55 @@ fbComposite (CARD8 op,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else if (maskRepeat &&
|
||||||
|
pMask->pDrawable->width == 1 &&
|
||||||
|
pMask->pDrawable->height == 1)
|
||||||
{
|
{
|
||||||
/* non-repeating source, repeating mask => translucent window */
|
switch (pSrc->format) {
|
||||||
if (fbCanGetSolid(pMask))
|
case PICT_r5g6b5:
|
||||||
{
|
case PICT_b5g6r5:
|
||||||
if (pSrc->format == PICT_x8r8g8b8 &&
|
if (pDst->format == pSrc->format)
|
||||||
pDst->format == PICT_x8r8g8b8 &&
|
func = fbCompositeTrans_0565xnx0565;
|
||||||
pMask->format == PICT_a8)
|
break;
|
||||||
{
|
case PICT_r8g8b8:
|
||||||
|
case PICT_b8g8r8:
|
||||||
|
if (pDst->format == pSrc->format)
|
||||||
|
func = fbCompositeTrans_0888xnx0888;
|
||||||
|
break;
|
||||||
#ifdef USE_MMX
|
#ifdef USE_MMX
|
||||||
if (fbHaveMMX())
|
case PICT_x8r8g8b8:
|
||||||
func = fbCompositeSrc_8888x8x8888mmx;
|
if ((pDst->format == PICT_a8r8g8b8 ||
|
||||||
|
pDst->format == PICT_x8r8g8b8) &&
|
||||||
|
pMask->format == PICT_a8 && fbHaveMMX())
|
||||||
|
func = fbCompositeSrc_x888x8x8888mmx;
|
||||||
|
break;
|
||||||
|
case PICT_x8b8g8r8:
|
||||||
|
if ((pDst->format == PICT_a8b8g8r8 ||
|
||||||
|
pDst->format == PICT_x8b8g8r8) &&
|
||||||
|
pMask->format == PICT_a8 && fbHaveMMX())
|
||||||
|
func = fbCompositeSrc_x888x8x8888mmx;
|
||||||
|
break;
|
||||||
|
case PICT_a8r8g8b8:
|
||||||
|
if ((pDst->format == PICT_a8r8g8b8 ||
|
||||||
|
pDst->format == PICT_x8r8g8b8) &&
|
||||||
|
pMask->format == PICT_a8 && fbHaveMMX())
|
||||||
|
func = fbCompositeSrc_8888x8x8888mmx;
|
||||||
|
break;
|
||||||
|
case PICT_a8b8g8r8:
|
||||||
|
if ((pDst->format == PICT_a8b8g8r8 ||
|
||||||
|
pDst->format == PICT_x8b8g8r8) &&
|
||||||
|
pMask->format == PICT_a8 && fbHaveMMX())
|
||||||
|
func = fbCompositeSrc_8888x8x8888mmx;
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (func != fbCompositeGeneral)
|
||||||
|
maskRepeat = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (maskRepeat &&
|
|
||||||
pMask->pDrawable->width == 1 &&
|
|
||||||
pMask->pDrawable->height == 1)
|
|
||||||
{
|
|
||||||
switch (pSrc->format) {
|
|
||||||
case PICT_r5g6b5:
|
|
||||||
case PICT_b5g6r5:
|
|
||||||
if (pDst->format == pSrc->format)
|
|
||||||
func = fbCompositeTrans_0565xnx0565;
|
|
||||||
break;
|
|
||||||
case PICT_r8g8b8:
|
|
||||||
case PICT_b8g8r8:
|
|
||||||
if (pDst->format == pSrc->format)
|
|
||||||
func = fbCompositeTrans_0888xnx0888;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (func != fbCompositeGeneral)
|
|
||||||
maskRepeat = FALSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else /* no mask */
|
else /* no mask */
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue