summaryrefslogtreecommitdiff
path: root/miext
diff options
context:
space:
mode:
Diffstat (limited to 'miext')
-rw-r--r--miext/layer/layerinit.c4
-rw-r--r--miext/layer/layerpict.c2
-rw-r--r--miext/layer/layerstr.h9
-rw-r--r--miext/layer/layerwin.c10
-rw-r--r--miext/shadow/shadow.c28
5 files changed, 34 insertions, 19 deletions
diff --git a/miext/layer/layerinit.c b/miext/layer/layerinit.c
index dfeae6c2d..6cbca7150 100644
--- a/miext/layer/layerinit.c
+++ b/miext/layer/layerinit.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/miext/layer/layerinit.c,v 1.6 2002/11/08 22:19:42 keithp Exp $
+ * $XFree86: xc/programs/Xserver/miext/layer/layerinit.c,v 1.7 2003/11/10 18:22:49 tsi Exp $
*
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -273,7 +273,7 @@ LayerCreate (ScreenPtr pScreen,
if (pPixmap)
pPixmap->refcnt++;
}
- REGION_INIT (pScreen, &pLay->region, NullBox, 0);
+ REGION_NULL(pScreen, &pLay->region);
/*
* Hook the layer at the end of the list
*/
diff --git a/miext/layer/layerpict.c b/miext/layer/layerpict.c
index e233d0271..ef412a2c5 100644
--- a/miext/layer/layerpict.c
+++ b/miext/layer/layerpict.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/miext/layer/layerpict.c,v 1.1 2001/05/29 04:54:13 keithp Exp $
+ * $XFree86: xc/programs/Xserver/miext/layer/layerpict.c,v 1.2 2003/08/22 19:27:32 eich Exp $
*
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
*
diff --git a/miext/layer/layerstr.h b/miext/layer/layerstr.h
index 1720a536c..401dfd96f 100644
--- a/miext/layer/layerstr.h
+++ b/miext/layer/layerstr.h
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/miext/layer/layerstr.h,v 1.3 2002/11/08 22:19:42 keithp Exp $
+ * $XFree86: xc/programs/Xserver/miext/layer/layerstr.h,v 1.4 2003/08/22 19:27:32 eich Exp $
*
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -72,11 +72,11 @@ typedef struct _LayerKind {
DestroyPixmapProcPtr DestroyPixmap;
CreateGCProcPtr CreateGC;
-
+#ifdef RENDER
CompositeProcPtr Composite;
GlyphsProcPtr Glyphs;
CompositeRectsProcPtr CompositeRects;
-
+#endif
} LayerKindRec;
#define LayerWrap(orig,lay,member,func) \
@@ -194,6 +194,7 @@ layerDestroyPixmap (PixmapPtr pPixmap);
Bool
layerCreateGC (GCPtr pGC);
+#ifdef RENDER
void
layerComposite (CARD8 op,
PicturePtr pSrc,
@@ -224,7 +225,7 @@ layerCompositeRects (CARD8 op,
xRenderColor *color,
int nRect,
xRectangle *rects);
-
+#endif
void layerValidateGC(GCPtr, unsigned long, DrawablePtr);
void layerChangeGC(GCPtr, unsigned long);
void layerCopyGC(GCPtr, unsigned long, GCPtr);
diff --git a/miext/layer/layerwin.c b/miext/layer/layerwin.c
index 8160000c8..44a5df24c 100644
--- a/miext/layer/layerwin.c
+++ b/miext/layer/layerwin.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/miext/layer/layerwin.c,v 1.7 2002/11/08 22:19:42 keithp Exp $
+ * $XFree86: xc/programs/Xserver/miext/layer/layerwin.c,v 1.8 2003/11/10 18:22:49 tsi Exp $
*
* Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -35,16 +35,16 @@ NewLayerList (ScreenPtr pScreen, LayerPtr pLayer)
pLayList->pNext = 0;
pLayList->pLayer = pLayer;
pLayList->inheritClip = TRUE;
- REGION_INIT (pScreen, &pLayList->clipList, NullBox, 0);
- REGION_INIT (pScreen, &pLayList->borderClip, NullBox, 0);
+ REGION_NULL (pScreen, &pLayList->clipList);
+ REGION_NULL (pScreen, &pLayList->borderClip);
return pLayList;
}
static void
FreeLayerList (ScreenPtr pScreen, LayerListPtr pLayList)
{
- REGION_UNINIT (&pScreen, &pLayList->clipList);
- REGION_UNINIT (&pScreen, &pLayList->borderClip);
+ REGION_UNINIT (pScreen, &pLayList->clipList);
+ REGION_UNINIT (pScreen, &pLayList->borderClip);
xfree (pLayList);
}
diff --git a/miext/shadow/shadow.c b/miext/shadow/shadow.c
index 60a1555d8..38a92953f 100644
--- a/miext/shadow/shadow.c
+++ b/miext/shadow/shadow.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: xc/programs/Xserver/miext/shadow/shadow.c,v 1.13 2002/12/02 20:37:23 tsi Exp $
+ * $XFree86: xc/programs/Xserver/miext/shadow/shadow.c,v 1.15 2003/11/10 18:22:51 tsi Exp $
*
* Copyright © 2000 Keith Packard
*
@@ -413,7 +413,7 @@ shadowFillSpans(
while(--i) {
ppt++;
- pwidthInit++;
+ pwidth++;
if(box.x1 > ppt->x) box.x1 = ppt->x;
if(box.x2 < (ppt->x + *pwidth))
box.x2 = ppt->x + *pwidth;
@@ -425,7 +425,11 @@ shadowFillSpans(
(*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted);
- TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC);
+ if(!pGC->miTranslate) {
+ TRANSLATE_BOX(box, pDraw);
+ }
+ TRIM_BOX(box, pGC);
+
if(BOX_NOT_EMPTY(box))
shadowDamageBox ((WindowPtr) pDraw, &box);
} else
@@ -471,7 +475,11 @@ shadowSetSpans(
(*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, pptInit,
pwidthInit, nspans, fSorted);
- TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC);
+ if(!pGC->miTranslate) {
+ TRANSLATE_BOX(box, pDraw);
+ }
+ TRIM_BOX(box, pGC);
+
if(BOX_NOT_EMPTY(box))
shadowDamageBox ((WindowPtr) pDraw, &box);
} else
@@ -1254,9 +1262,15 @@ shadowPushPixels(
if(IS_VISIBLE(pDraw)) {
BoxRec box;
- box.x1 = xOrg + pDraw->x;
+ box.x1 = xOrg;
+ box.y1 = yOrg;
+
+ if(!pGC->miTranslate) {
+ box.x1 += pDraw->x;
+ box.y1 += pDraw->y;
+ }
+
box.x2 = box.x1 + dx;
- box.y1 = yOrg + pDraw->y;
box.y2 = box.y1 + dy;
TRIM_BOX(box, pGC);
@@ -1459,7 +1473,7 @@ shadowAdd (ScreenPtr pScreen,
pBuf->pPixmap = pPixmap;
pBuf->update = update;
pBuf->window = window;
- REGION_INIT (pScreen, &pBuf->damage, NullBox, 0);
+ REGION_NULL(pScreen, &pBuf->damage);
pBuf->pNext = pScrPriv->pBuf;
pBuf->randr = randr;
pBuf->closure = 0;