Index: programs/Xserver/fb/fb.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/fb/fb.h,v retrieving revision 1.12 diff -u -r1.12 fb.h --- programs/Xserver/fb/fb.h 24 Aug 2005 11:18:33 -0000 1.12 +++ programs/Xserver/fb/fb.h 29 Sep 2005 09:21:07 -0000 @@ -648,37 +648,53 @@ #endif #ifdef ROOTLESS -#define __fbPixOriginX(pPix) ((pPix)->drawable.x) -#define __fbPixOriginY(pPix) ((pPix)->drawable.y) +#define __fbPixDrawableX(pPix) ((pPix)->drawable.x) +#define __fbPixDrawableY(pPix) ((pPix)->drawable.y) #else -#define __fbPixOriginX(pPix) 0 -#define __fbPixOriginY(pPix) 0 +#define __fbPixDrawableX(pPix) 0 +#define __fbPixDrawableY(pPix) 0 #endif +#ifdef COMPOSITE +#define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix) - (pPix)->screen_x) +#define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix) - (pPix)->screen_y) +#else +#define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix)) +#define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix)) +#endif +#define __fbPixOffXPix(pPix) (__fbPixDrawableX(pPix)) +#define __fbPixOffYPix(pPix) (__fbPixDrawableX(pPix)) + #define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \ PixmapPtr _pPix; \ - if ((pDrawable)->type != DRAWABLE_PIXMAP) \ + if ((pDrawable)->type != DRAWABLE_PIXMAP) { \ _pPix = fbGetWindowPixmap(pDrawable); \ - else \ + (xoff) = __fbPixOffXWin(_pPix); \ + (yoff) = __fbPixOffYWin(_pPix); \ + } else { \ _pPix = (PixmapPtr) (pDrawable); \ + (xoff) = __fbPixOffXPix(_pPix); \ + (yoff) = __fbPixOffYPix(_pPix); \ + } \ (pointer) = (FbBits *) _pPix->devPrivate.ptr; \ (stride) = ((int) _pPix->devKind) / sizeof (FbBits); (void)(stride); \ (bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \ - (xoff) = __fbPixOriginX(_pPix); (void)(xoff); \ - (yoff) = __fbPixOriginY(_pPix); (void)(yoff); \ } #define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \ PixmapPtr _pPix; \ - if ((pDrawable)->type != DRAWABLE_PIXMAP) \ + if ((pDrawable)->type != DRAWABLE_PIXMAP) { \ _pPix = fbGetWindowPixmap(pDrawable); \ - else \ + (xoff) = __fbPixOffXWin(_pPix); \ + (yoff) = __fbPixOffYWin(_pPix); \ + } else { \ _pPix = (PixmapPtr) (pDrawable); \ + (xoff) = __fbPixOffXPix(_pPix); \ + (yoff) = __fbPixOffYPix(_pPix); \ + } \ (pointer) = (FbStip *) _pPix->devPrivate.ptr; \ (stride) = ((int) _pPix->devKind) / sizeof (FbStip); (void)(stride); \ (bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \ - (xoff) = __fbPixOriginX(_pPix); (void)(xoff); \ - (yoff) = __fbPixOriginY(_pPix); (void)(yoff); \ } /* Index: programs/Xserver/hw/xfree86/exa/Imakefile =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/exa/Imakefile,v retrieving revision 1.1 diff -u -r1.1 Imakefile --- programs/Xserver/hw/xfree86/exa/Imakefile 1 Jul 2005 08:56:12 -0000 1.1 +++ programs/Xserver/hw/xfree86/exa/Imakefile 29 Sep 2005 03:18:47 -0000 @@ -16,7 +16,7 @@ INCLUDES = -I$(XF86COMSRC) -I$(XF86OSSRC) -I$(EXTINCSRC) \ -I$(SERVERSRC)/cfb -I$(SERVERSRC)/mfb -I$(SERVERSRC)/mi \ -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(FONTINCSRC) \ - -I$(SERVERSRC)/fb \ + -I$(SERVERSRC)/fb -I$(SERVERSRC)/miext/cw \ -I$(SERVERSRC)/Xext -I$(SERVERSRC)/render -I$(SERVERSRC)/randr ModuleObjectRule() Index: programs/Xserver/hw/xfree86/exa/exa.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/exa/exa.c,v retrieving revision 1.23 diff -u -r1.23 exa.c --- programs/Xserver/hw/xfree86/exa/exa.c 28 Sep 2005 20:01:37 -0000 1.23 +++ programs/Xserver/hw/xfree86/exa/exa.c 29 Sep 2005 09:06:13 -0000 @@ -31,6 +31,7 @@ #include "xf86str.h" #include "xf86.h" #include "exa.h" +#include "cw.h" #if DEBUG_MIGRATE #define DBG_MIGRATE(a) ErrorF a @@ -1232,19 +1233,17 @@ { int nbox = REGION_NUM_RECTS (pRegion); BoxPtr pBox = REGION_RECTS (pRegion); - int xRot = pDrawable->x + xoff; - int yRot = pDrawable->y + yoff; while (nbox--) { int height = pBox->y2 - pBox->y1; - int dstY = pBox->y1 + yoff; + int dstY = pBox->y1; int tileY; - modulus (dstY - yRot, tileHeight, tileY); + tileY = (dstY - pDrawable->y) % tileHeight; while (height > 0) { int width = pBox->x2 - pBox->x1; - int dstX = pBox->x1 + xoff; + int dstX = pBox->x1; int tileX; int h = tileHeight - tileY; @@ -1252,7 +1251,7 @@ h = height; height -= h; - modulus (dstX - xRot, tileWidth, tileX); + tileX = (dstX - pDrawable->x) % tileWidth; while (width > 0) { int w = tileWidth - tileX; if (w > width) @@ -1261,7 +1260,7 @@ (*pExaScr->info->accel.Copy) (pPixmap, tileX, tileY, - dstX, dstY, + dstX + xoff, dstY + yoff, w, h); dstX += w; tileX = 0; @@ -1428,6 +1427,8 @@ } #endif + miDisableCompositeWrapper(pScreen); + /* * Hookup offscreen pixmaps */ Index: programs/Xserver/miext/cw/cw.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/miext/cw/cw.c,v retrieving revision 1.22 diff -u -r1.22 cw.c --- programs/Xserver/miext/cw/cw.c 3 Jul 2005 07:02:01 -0000 1.22 +++ programs/Xserver/miext/cw/cw.c 29 Sep 2005 03:18:47 -0000 @@ -48,6 +48,7 @@ #ifdef RENDER int cwPictureIndex; #endif +static Bool cwDisabled[MAXSCREENS]; static unsigned long cwGeneration = 0; extern GCOps cwGCOps; @@ -617,6 +618,9 @@ { cwScreenPtr pScreenPriv; + if (cwDisabled[pScreen->myNum]) + return; + if (cwGeneration != serverGeneration) { cwScreenIndex = AllocateScreenPrivateIndex(); @@ -660,6 +664,12 @@ #endif } +void +miDisableCompositeWrapper(ScreenPtr pScreen) +{ + cwDisabled[pScreen->myNum] = TRUE; +} + static Bool cwCloseScreen (int i, ScreenPtr pScreen) { Index: programs/Xserver/miext/cw/cw.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/miext/cw/cw.h,v retrieving revision 1.12 diff -u -r1.12 cw.h --- programs/Xserver/miext/cw/cw.h 3 Jul 2005 07:02:01 -0000 1.12 +++ programs/Xserver/miext/cw/cw.h 29 Sep 2005 03:18:47 -0000 @@ -164,5 +164,10 @@ cwFiniRender (ScreenPtr pScreen); /* cw.c */ + void miInitializeCompositeWrapper(ScreenPtr pScreen); + +/* Must be called before miInitializeCompositeWrapper */ +void +miDisableCompositeWrapper(ScreenPtr pScreen);