Commit 67347739 authored by Soren Sandmann Pedersen's avatar Soren Sandmann Pedersen
Browse files

Don't treat convolution filters as transformations.

Some rearrangement of code to get it closer to pixman.
parent c056ce95
...@@ -1461,9 +1461,9 @@ fbComposite (CARD8 op, ...@@ -1461,9 +1461,9 @@ fbComposite (CARD8 op,
int n; int n;
BoxPtr pbox; BoxPtr pbox;
CompositeFunc func = NULL; CompositeFunc func = NULL;
Bool srcRepeat = pSrc->pDrawable && pSrc->repeat; Bool srcRepeat = pSrc->pDrawable && pSrc->repeatType == RepeatNormal;
Bool maskRepeat = FALSE; Bool maskRepeat = FALSE;
Bool srcTransform = pSrc->pDrawable && pSrc->transform; Bool srcTransform = pSrc->transform != 0;
Bool maskTransform = FALSE; Bool maskTransform = FALSE;
Bool srcAlphaMap = pSrc->alphaMap != 0; Bool srcAlphaMap = pSrc->alphaMap != 0;
Bool maskAlphaMap = FALSE; Bool maskAlphaMap = FALSE;
...@@ -1479,9 +1479,6 @@ fbComposite (CARD8 op, ...@@ -1479,9 +1479,6 @@ fbComposite (CARD8 op,
} }
#endif #endif
if (pSrc->filter == PictFilterConvolution)
srcTransform = TRUE;
xDst += pDst->pDrawable->x; xDst += pDst->pDrawable->x;
yDst += pDst->pDrawable->y; yDst += pDst->pDrawable->y;
if (pSrc->pDrawable) { if (pSrc->pDrawable) {
...@@ -1517,21 +1514,6 @@ fbComposite (CARD8 op, ...@@ -1517,21 +1514,6 @@ fbComposite (CARD8 op,
&& (pSrc->filter != PictFilterConvolution) && (pSrc->filter != PictFilterConvolution)
&& (!pMask || pMask->filter != PictFilterConvolution)) && (!pMask || pMask->filter != PictFilterConvolution))
switch (op) { switch (op) {
case PictOpSrc:
#ifdef USE_MMX
if (!pMask && pSrc->format == pDst->format &&
pSrc->format != PICT_a8 && pSrc->pDrawable != pDst->pDrawable)
{
func = fbCompositeCopyAreammx;
}
else
#endif
if (pMask == 0)
{
if (pSrc->format == pDst->format)
func = fbCompositeSrcSrc_nxn;
}
break;
case PictOpOver: case PictOpOver:
if (pMask) if (pMask)
{ {
...@@ -1975,6 +1957,21 @@ fbComposite (CARD8 op, ...@@ -1975,6 +1957,21 @@ fbComposite (CARD8 op,
} }
} }
break; break;
case PictOpSrc:
#ifdef USE_MMX
if (!pMask && pSrc->format == pDst->format &&
pSrc->format != PICT_a8 && pSrc->pDrawable != pDst->pDrawable)
{
func = fbCompositeCopyAreammx;
}
else
#endif
if (pMask == 0)
{
if (pSrc->format == pDst->format)
func = fbCompositeSrcSrc_nxn;
}
break;
} }
if (!func) { if (!func) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment