xserver: Branch 'master' - 4 commits
Søren Sandmann Pedersen
sandmann at kemper.freedesktop.org
Thu Apr 26 19:43:12 EEST 2007
fb/fbpict.c | 172 ++++++++++++++++++++++++++++++++++++------------------
miext/cw/cw_ops.c | 37 ++++++-----
2 files changed, 135 insertions(+), 74 deletions(-)
New commits:
diff-tree 4fe918b38553133c27e5ae672e5c43984a9bbaea (from 0ff7c94fcf6497ee8575f81cf97eeeb3a857739e)
Author: Soren Sandmann Pedersen <ssp at dhcp83-218.boston.redhat.com>
Date: Thu Apr 26 12:41:01 2007 -0400
Fix bug 8871 - scrolling corruption with a compositing manager
Call miHandleExposures() in CopyArea/CopyPlane explicitly in cw to
generate GraphicsExposes correctly.
diff --git a/miext/cw/cw_ops.c b/miext/cw/cw_ops.c
index 80b7280..82ec999 100644
--- a/miext/cw/cw_ops.c
+++ b/miext/cw/cw_ops.c
@@ -30,6 +30,7 @@
#include "gcstruct.h"
#include "pixmapstr.h"
#include "cw.h"
+#include "mi.h"
#define SETUP_BACKING_DST(_pDst, _pGC) \
cwGCPtr pGCPrivate = getCwGC (_pGC); \
@@ -185,7 +186,7 @@ cwCopyArea(DrawablePtr pSrc, DrawablePtr
int w, int h, int dstx, int dsty)
{
int odstx, odsty;
- RegionPtr exposed = NULL;
+ int osrcx, osrcy;
SETUP_BACKING_DST(pDst, pGC);
SETUP_BACKING_SRC(pSrc, pGC);
@@ -193,19 +194,20 @@ cwCopyArea(DrawablePtr pSrc, DrawablePtr
odstx = dstx;
odsty = dsty;
+ osrcx = srcx;
+ osrcy = srcy;
CW_OFFSET_XY_DST(dstx, dsty);
CW_OFFSET_XY_SRC(srcx, srcy);
- exposed = (*pBackingGC->ops->CopyArea)(pBackingSrc, pBackingDst,
- pBackingGC, srcx, srcy, w, h,
- dstx, dsty);
-
- if (exposed != NULL)
- REGION_TRANSLATE(pDst->pScreen, exposed, odstx - dstx, odsty - dsty);
-
+ (*pBackingGC->ops->CopyArea)(pBackingSrc, pBackingDst,
+ pBackingGC, srcx, srcy, w, h,
+ dstx, dsty);
+
EPILOGUE(pGC);
- return exposed;
+ return miHandleExposures(pSrc, pDst, pGC,
+ osrcx, osrcy, w, h,
+ odstx, odsty, 0);
}
static RegionPtr
@@ -213,7 +215,7 @@ cwCopyPlane(DrawablePtr pSrc, DrawablePt
int w, int h, int dstx, int dsty, unsigned long plane)
{
int odstx, odsty;
- RegionPtr exposed = NULL;
+ int osrcx, osrcy;
SETUP_BACKING_DST(pDst, pGC);
SETUP_BACKING_SRC(pSrc, pGC);
@@ -221,19 +223,20 @@ cwCopyPlane(DrawablePtr pSrc, DrawablePt
odstx = dstx;
odsty = dsty;
+ osrcx = srcx;
+ osrcy = srcy;
CW_OFFSET_XY_DST(dstx, dsty);
CW_OFFSET_XY_SRC(srcx, srcy);
- exposed = (*pBackingGC->ops->CopyPlane)(pBackingSrc, pBackingDst,
- pBackingGC, srcx, srcy, w, h,
- dstx, dsty, plane);
-
- if (exposed != NULL)
- REGION_TRANSLATE(pDst->pScreen, exposed, odstx - dstx, odsty - dsty);
+ (*pBackingGC->ops->CopyPlane)(pBackingSrc, pBackingDst,
+ pBackingGC, srcx, srcy, w, h,
+ dstx, dsty, plane);
EPILOGUE(pGC);
- return exposed;
+ return miHandleExposures(pSrc, pDst, pGC,
+ osrcx, osrcy, w, h,
+ odstx, odsty, plane);
}
static void
diff-tree 0ff7c94fcf6497ee8575f81cf97eeeb3a857739e (from 701ccb4a22cfd646ccb7f19b7b3a476aeb5ce2da)
Author: Soren Sandmann Pedersen <ssp at dhcp83-218.boston.redhat.com>
Date: Thu Apr 26 10:56:02 2007 -0400
Pixman merge
Make use of fbCompositeSrcAdd_8888x8x8mmx
diff --git a/fb/fbpict.c b/fb/fbpict.c
index ace19fd..0a08aff 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -1962,7 +1962,12 @@ fbComposite (CARD8 op,
pDst->format == PICT_a8)
{
srcRepeat = FALSE;
- func = fbCompositeSrcAdd_8888x8x8;
+#ifdef USE_MMX
+ if (fbHaveMMX())
+ func = fbCompositeSrcAdd_8888x8x8mmx;
+ else
+#endif
+ func = fbCompositeSrcAdd_8888x8x8;
}
}
break;
diff-tree 701ccb4a22cfd646ccb7f19b7b3a476aeb5ce2da (from a54ef54db19dcd36ed86b33cff2bc369f9690a15)
Author: Soren Sandmann Pedersen <ssp at dhcp83-218.boston.redhat.com>
Date: Thu Apr 26 10:49:06 2007 -0400
Pixman merge
- Remove stray default label
- Integrate new MMX ops SolidMaskSrc_nx8x8888mmx, In_8x8mmx, and
In_nx8x8mmx
- Formatting changes to reduce diff noise
diff --git a/fb/fbpict.c b/fb/fbpict.c
index 1932b3e..ace19fd 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -1641,8 +1641,6 @@ fbComposite (CARD8 op,
default:
break;
}
- default:
- break;
}
if (func != fbCompositeGeneral)
srcRepeat = FALSE;
@@ -1969,19 +1967,73 @@ fbComposite (CARD8 op,
}
break;
case PictOpSrc:
-#ifdef USE_MMX
- if (!pMask && pSrc->format == pDst->format &&
- pSrc->format != PICT_a8 && pSrc->pDrawable != pDst->pDrawable)
+ if (pMask)
{
- func = fbCompositeCopyAreammx;
+#ifdef USE_MMX
+ if (fbCanGetSolid (pSrc))
+ {
+ if (pMask->format == PICT_a8)
+ {
+ switch (pDst->format)
+ {
+ case PICT_a8r8g8b8:
+ case PICT_x8r8g8b8:
+ case PICT_a8b8g8r8:
+ case PICT_x8b8g8r8:
+ if (fbHaveMMX())
+ {
+ srcRepeat = FALSE;
+ func = fbCompositeSolidMaskSrc_nx8x8888mmx;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ }
+#endif
}
else
-#endif
- if (pMask == 0)
+ {
+ if (pSrc->format == pDst->format)
{
- if (pSrc->format == pDst->format)
+#ifdef USE_MMX
+ if (pSrc->pDrawable != pDst->pDrawable && fbHaveMMX() &&
+ (PICT_FORMAT_BPP (pSrc->format) == 16 ||
+ PICT_FORMAT_BPP (pSrc->format) == 32))
+ func = fbCompositeCopyAreammx;
+ else
+#endif
func = fbCompositeSrcSrc_nxn;
}
+ }
+ break;
+ case PictOpIn:
+#ifdef USE_MMX
+ if (pSrc->format == PICT_a8 &&
+ pDst->format == PICT_a8 &&
+ !pMask)
+ {
+ if (fbHaveMMX())
+ func = fbCompositeIn_8x8mmx;
+ }
+ else if (srcRepeat && pMask && !pMask->componentAlpha &&
+ (pSrc->format == PICT_a8r8g8b8 ||
+ pSrc->format == PICT_a8b8g8r8) &&
+ (pMask->format == PICT_a8) &&
+ pDst->format == PICT_a8)
+ {
+ if (fbHaveMMX())
+ {
+ srcRepeat = FALSE;
+ func = fbCompositeIn_nx8x8mmx;
+ }
+ }
+#else
+ func = NULL;
+#endif
+ break;
+ default:
break;
}
@@ -1991,26 +2043,16 @@ fbComposite (CARD8 op,
return;
}
- if (!miComputeCompositeRegion (®ion,
- pSrc,
- pMask,
- pDst,
- xSrc,
- ySrc,
- xMask,
- yMask,
- xDst,
- yDst,
- width,
- height))
- return;
-
/* if we are transforming, we handle repeats in fbFetchTransformed */
if (srcTransform)
srcRepeat = FALSE;
if (maskTransform)
maskRepeat = FALSE;
+ if (!miComputeCompositeRegion (®ion, pSrc, pMask, pDst, xSrc, ySrc,
+ xMask, yMask, xDst, yDst, width, height))
+ return;
+
n = REGION_NUM_RECTS (®ion);
pbox = REGION_RECTS (®ion);
while (n--)
diff-tree a54ef54db19dcd36ed86b33cff2bc369f9690a15 (from 3571b8e65b0857322d12e291305cfe29ea497c3c)
Author: Soren Sandmann Pedersen <ssp at dhcp83-218.boston.redhat.com>
Date: Thu Apr 26 10:24:25 2007 -0400
Pixman merge
Make sure fbCompositeSrc_x888x8x8888mmx and fbCompositeSrc_8888x8x8888mmx
are used when possible.
diff --git a/fb/fbpict.c b/fb/fbpict.c
index 4fb949d..1932b3e 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -1647,7 +1647,7 @@ fbComposite (CARD8 op,
if (func != fbCompositeGeneral)
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 &&
xSrc == xMask && ySrc == yMask &&
@@ -1712,44 +1712,55 @@ fbComposite (CARD8 op,
}
break;
}
- else
+ else if (maskRepeat &&
+ pMask->pDrawable->width == 1 &&
+ pMask->pDrawable->height == 1)
{
- /* non-repeating source, repeating mask => translucent window */
- if (fbCanGetSolid(pMask))
- {
- if (pSrc->format == PICT_x8r8g8b8 &&
- pDst->format == PICT_x8r8g8b8 &&
- pMask->format == PICT_a8)
- {
+ 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;
#ifdef USE_MMX
- if (fbHaveMMX())
- func = fbCompositeSrc_8888x8x8888mmx;
+ case PICT_x8r8g8b8:
+ 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
- }
+ 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 */
{
More information about the xorg-commit
mailing list