[PATCH 4/4] dix: Move ChangeClip from GCFuncs to ScreenRec
Adam Jackson
ajax at redhat.com
Mon Dec 5 10:56:17 PST 2011
Same deal as DestroyClip.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
Xext/panoramiX.c | 14 --------------
dix/gc.c | 14 +++++++-------
exa/exa.c | 19 -------------------
fb/fbgc.c | 1 -
fb/fbscreen.c | 1 +
hw/dmx/dmx.h | 1 +
hw/dmx/dmxgc.c | 7 +++----
hw/dmx/dmxscrinit.c | 2 ++
hw/xfree86/common/xf86VGAarbiter.c | 14 +-------------
hw/xfree86/common/xf86VGAarbiterPriv.h | 2 --
hw/xfree86/shadowfb/shadow.c | 14 --------------
hw/xfree86/xaa/xaaGC.c | 13 -------------
hw/xnest/GC.c | 4 +---
hw/xnest/Screen.c | 1 +
hw/xwin/wingc.c | 16 ----------------
include/gcstruct.h | 6 ------
include/scrnintstr.h | 7 +++++++
mi/mibitblt.c | 4 ++--
mi/migc.c | 7 ++-----
miext/cw/cw.c | 21 +++------------------
miext/damage/damage.c | 13 -------------
miext/rootless/rootlessGC.c | 10 ----------
render/mirect.c | 5 ++---
xfixes/region.c | 2 +-
24 files changed, 34 insertions(+), 164 deletions(-)
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index 33e7a60..668831f 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -129,11 +129,9 @@ static void XineramaValidateGC(GCPtr, unsigned long, DrawablePtr);
static void XineramaChangeGC(GCPtr, unsigned long);
static void XineramaCopyGC(GCPtr, unsigned long, GCPtr);
static void XineramaDestroyGC(GCPtr);
-static void XineramaChangeClip(GCPtr, int, pointer, int);
static GCFuncs XineramaGCFuncs = {
XineramaValidateGC, XineramaChangeGC, XineramaCopyGC, XineramaDestroyGC,
- XineramaChangeClip,
};
#define Xinerama_GC_FUNC_PROLOGUE(pGC)\
@@ -297,18 +295,6 @@ XineramaCopyGC (
Xinerama_GC_FUNC_EPILOGUE (pGCDst);
}
-static void
-XineramaChangeClip (
- GCPtr pGC,
- int type,
- pointer pvalue,
- int nrects
-){
- Xinerama_GC_FUNC_PROLOGUE (pGC);
- (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
- Xinerama_GC_FUNC_EPILOGUE (pGC);
-}
-
int
XineramaDeleteResource(pointer data, XID id)
{
diff --git a/dix/gc.c b/dix/gc.c
index f46ee13..8eba76b 100644
--- a/dix/gc.c
+++ b/dix/gc.c
@@ -338,8 +338,8 @@ ChangeGC(ClientPtr client, GC *pGC, BITS32 mask, ChangeGCValPtr pUnion)
}
pPixmap->refcnt++;
}
- (*pGC->funcs->ChangeClip)(pGC, pPixmap ? CT_PIXMAP : CT_NONE,
- (pointer)pPixmap, 0);
+ (*pGC->pScreen->ChangeClip)(pGC, pPixmap ? CT_PIXMAP : CT_NONE,
+ (pointer)pPixmap, 0);
break;
case GCDashOffset:
NEXTVAL(INT16, pGC->dashOffset);
@@ -616,13 +616,13 @@ doCopyClip(GCPtr pgcDst, GCPtr pgcSrc)
((PixmapPtr) pgcSrc->clientClip)->refcnt++;
/* Fall through !! */
case CT_NONE:
- (*pgcDst->funcs->ChangeClip) (pgcDst, (int) pgcSrc->clientClipType,
- pgcSrc->clientClip, 0);
+ (*pgcDst->pScreen->ChangeClip) (pgcDst, (int) pgcSrc->clientClipType,
+ pgcSrc->clientClip, 0);
break;
case CT_REGION:
prgnNew = RegionCreate(NULL, 1);
RegionCopy(prgnNew, (RegionPtr) (pgcSrc->clientClip));
- (*pgcDst->funcs->ChangeClip) (pgcDst, CT_REGION, (pointer) prgnNew, 0);
+ (*pgcDst->pScreen->ChangeClip) (pgcDst, CT_REGION, (pointer) prgnNew, 0);
break;
}
}
@@ -1099,7 +1099,7 @@ SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects,
if (size)
memmove((char *)prectsNew, (char *)prects, size);
- (*pGC->funcs->ChangeClip)(pGC, newct, (pointer)prectsNew, nrects);
+ (*pGC->pScreen->ChangeClip)(pGC, newct, (pointer)prectsNew, nrects);
if (pGC->funcs->ChangeGC)
(*pGC->funcs->ChangeGC) (pGC, GCClipXOrigin|GCClipYOrigin|GCClipMask);
return Success;
@@ -1144,7 +1144,7 @@ GetScratchGC(unsigned depth, ScreenPtr pScreen)
pGC->clipOrg.x = 0;
pGC->clipOrg.y = 0;
if (pGC->clientClipType != CT_NONE)
- (*pGC->funcs->ChangeClip) (pGC, CT_NONE, NULL, 0);
+ (*pGC->pScreen->ChangeClip) (pGC, CT_NONE, NULL, 0);
pGC->stateChanges = GCAllBits;
return pGC;
}
diff --git a/exa/exa.c b/exa/exa.c
index afc4063..17cded0 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -480,18 +480,11 @@ exaCopyGC (GCPtr pGCSrc,
unsigned long mask,
GCPtr pGCDst);
-static void
-exaChangeClip (GCPtr pGC,
- int type,
- pointer pvalue,
- int nrects);
-
const GCFuncs exaGCFuncs = {
exaValidateGC,
exaChangeGC,
exaCopyGC,
exaDestroyGC,
- exaChangeClip,
};
static void
@@ -579,18 +572,6 @@ exaCopyGC (GCPtr pGCSrc,
swap(pExaGC, pGCDst, funcs);
}
-static void
-exaChangeClip (GCPtr pGC,
- int type,
- pointer pvalue,
- int nrects)
-{
- ExaGCPriv(pGC);
- swap(pExaGC, pGC, funcs);
- (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
- swap(pExaGC, pGC, funcs);
-}
-
/**
* exaCreateGC makes a new GC and hooks up its funcs handler, so that
* exaValidateGC() will get called.
diff --git a/fb/fbgc.c b/fb/fbgc.c
index f772a84..aa75d7a 100644
--- a/fb/fbgc.c
+++ b/fb/fbgc.c
@@ -33,7 +33,6 @@ const GCFuncs fbGCFuncs = {
miChangeGC,
miCopyGC,
miDestroyGC,
- miChangeClip,
};
const GCOps fbGCOps = {
diff --git a/fb/fbscreen.c b/fb/fbscreen.c
index 9610a84..88efc23 100644
--- a/fb/fbscreen.c
+++ b/fb/fbscreen.c
@@ -121,6 +121,7 @@ fbSetupScreen(ScreenPtr pScreen,
pScreen->RealizeFont = fbRealizeFont;
pScreen->UnrealizeFont = fbUnrealizeFont;
pScreen->CreateGC = fbCreateGC;
+ pScreen->ChangeClip = miChangeClip;
pScreen->DestroyClip = miDestroyClip;
pScreen->CreateColormap = fbInitializeColormap;
pScreen->DestroyColormap = (void (*)(ColormapPtr))NoopDDA;
diff --git a/hw/dmx/dmx.h b/hw/dmx/dmx.h
index a593efe..79a32a0 100644
--- a/hw/dmx/dmx.h
+++ b/hw/dmx/dmx.h
@@ -192,6 +192,7 @@ typedef struct _DMXScreenInfo {
SaveScreenProcPtr SaveScreen;
CreateGCProcPtr CreateGC;
+ ChangeClipProcPtr ChangeClip;
DestroyClipProcPtr DestroyClip;
CreateWindowProcPtr CreateWindow;
diff --git a/hw/dmx/dmxgc.c b/hw/dmx/dmxgc.c
index 86d96cd..d58e8d1 100644
--- a/hw/dmx/dmxgc.c
+++ b/hw/dmx/dmxgc.c
@@ -54,7 +54,6 @@ static GCFuncs dmxGCFuncs = {
dmxChangeGC,
dmxCopyGC,
dmxDestroyGC,
- dmxChangeClip,
};
static GCOps dmxGCOps = {
@@ -349,8 +348,8 @@ void dmxChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects)
BoxPtr pBox;
int i, nRects;
- DMX_GC_FUNC_PROLOGUE(pGC);
- pGC->funcs->ChangeClip(pGC, type, pvalue, nrects);
+ DMX_UNWRAP(ChangeClip, dmxScreen, pScreen);
+ pScreen->ChangeClip(pGC, type, pvalue, nrects);
/* Set the client clip on the back-end server */
switch (pGC->clientClipType) {
@@ -385,7 +384,7 @@ void dmxChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects)
break;
}
- DMX_GC_FUNC_EPILOGUE(pGC);
+ DMX_WRAP(ChangeClip, dmxChangeClip, dmxScreen, pScreen);
}
/** Destroy a GC's clip rects. */
diff --git a/hw/dmx/dmxscrinit.c b/hw/dmx/dmxscrinit.c
index f992ae2..cc1e0b2 100644
--- a/hw/dmx/dmxscrinit.c
+++ b/hw/dmx/dmxscrinit.c
@@ -266,6 +266,7 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[])
/* Wrap GC functions */
DMX_WRAP(CreateGC, dmxCreateGC, dmxScreen, pScreen);
+ DMX_WRAP(ChangeClip, dmxChangeClip, dmxScreen, pScreen);
DMX_WRAP(DestroyClip, dmxDestroyClip, dmxScreen, pScreen);
/* Wrap Window functions */
@@ -388,6 +389,7 @@ Bool dmxCloseScreen(int idx, ScreenPtr pScreen)
/* Unwrap the pScreen functions */
DMX_UNWRAP(CreateGC, dmxScreen, pScreen);
+ DMX_UNWRAP(ChangeClip, dmxScreen, pScreen);
DMX_UNWRAP(DestroyClip, dmxScreen, pScreen);
DMX_UNWRAP(CreateWindow, dmxScreen, pScreen);
diff --git a/hw/xfree86/common/xf86VGAarbiter.c b/hw/xfree86/common/xf86VGAarbiter.c
index 6989db2..02e3045 100644
--- a/hw/xfree86/common/xf86VGAarbiter.c
+++ b/hw/xfree86/common/xf86VGAarbiter.c
@@ -39,7 +39,7 @@
static GCFuncs VGAarbiterGCFuncs = {
VGAarbiterValidateGC, VGAarbiterChangeGC, VGAarbiterCopyGC,
- VGAarbiterDestroyGC, VGAarbiterChangeClip,
+ VGAarbiterDestroyGC,
};
static GCOps VGAarbiterGCOps = {
@@ -620,18 +620,6 @@ VGAarbiterCopyGC (
GC_WRAP (pGCDst);
}
-static void
-VGAarbiterChangeClip (
- GCPtr pGC,
- int type,
- pointer pvalue,
- int nrects )
-{
- GC_UNWRAP (pGC);
- (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
- GC_WRAP (pGC);
-}
-
/* GC Ops */
static void
VGAarbiterFillSpans(
diff --git a/hw/xfree86/common/xf86VGAarbiterPriv.h b/hw/xfree86/common/xf86VGAarbiterPriv.h
index cfead9a..2db2045 100644
--- a/hw/xfree86/common/xf86VGAarbiterPriv.h
+++ b/hw/xfree86/common/xf86VGAarbiterPriv.h
@@ -182,8 +182,6 @@ static void VGAarbiterValidateGC(GCPtr pGC, unsigned long changes,
static void VGAarbiterChangeGC(GCPtr pGC, unsigned long mask);
static void VGAarbiterCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst);
static void VGAarbiterDestroyGC(GCPtr pGC);
-static void VGAarbiterChangeClip(GCPtr pGC, int type, pointer pvalue,
- int nrects);
/* GC ops */
static void VGAarbiterFillSpans( DrawablePtr pDraw, GC *pGC, int nInit,
diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c
index 65a6e85..499bbc3 100644
--- a/hw/xfree86/shadowfb/shadow.c
+++ b/hw/xfree86/shadowfb/shadow.c
@@ -359,11 +359,9 @@ static void ShadowValidateGC(GCPtr, unsigned long, DrawablePtr);
static void ShadowChangeGC(GCPtr, unsigned long);
static void ShadowCopyGC(GCPtr, unsigned long, GCPtr);
static void ShadowDestroyGC(GCPtr);
-static void ShadowChangeClip(GCPtr, int, pointer, int);
GCFuncs ShadowGCFuncs = {
ShadowValidateGC, ShadowChangeGC, ShadowCopyGC, ShadowDestroyGC,
- ShadowChangeClip,
};
@@ -434,18 +432,6 @@ ShadowCopyGC (
SHADOW_GC_FUNC_EPILOGUE (pGCDst);
}
-static void
-ShadowChangeClip (
- GCPtr pGC,
- int type,
- pointer pvalue,
- int nrects
-){
- SHADOW_GC_FUNC_PROLOGUE (pGC);
- (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
- SHADOW_GC_FUNC_EPILOGUE (pGC);
-}
-
/**********************************************************/
diff --git a/hw/xfree86/xaa/xaaGC.c b/hw/xfree86/xaa/xaaGC.c
index 5baa80b..864189e 100644
--- a/hw/xfree86/xaa/xaaGC.c
+++ b/hw/xfree86/xaa/xaaGC.c
@@ -23,11 +23,9 @@ static void XAAValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDraw);
static void XAAChangeGC(GCPtr pGC, unsigned long mask);
static void XAACopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst);
static void XAADestroyGC(GCPtr pGC);
-static void XAAChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects);
GCFuncs XAAGCFuncs = {
XAAValidateGC, XAAChangeGC, XAACopyGC, XAADestroyGC,
- XAAChangeClip,
};
extern GCOps XAAPixmapOps;
@@ -278,17 +276,6 @@ XAACopyGC (
(*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst);
XAA_GC_FUNC_EPILOGUE (pGCDst);
}
-static void
-XAAChangeClip (
- GCPtr pGC,
- int type,
- pointer pvalue,
- int nrects )
-{
- XAA_GC_FUNC_PROLOGUE (pGC);
- (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
- XAA_GC_FUNC_EPILOGUE (pGC);
-}
/**** Pixmap Wrappers ****/
diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c
index 312294f..4f8b572 100644
--- a/hw/xnest/GC.c
+++ b/hw/xnest/GC.c
@@ -43,7 +43,6 @@ static GCFuncs xnestFuncs = {
xnestChangeGC,
xnestCopyGC,
xnestDestroyGC,
- xnestChangeClip,
};
static GCOps xnestOps = {
@@ -269,8 +268,7 @@ xnestChangeClip(GCPtr pGC, int type, pointer pValue, int nRects)
* other parts of server can only deal with CT_NONE,
* CT_PIXMAP and CT_REGION client clips.
*/
- pGC->clientClip = (pointer) RegionFromRects(nRects,
- (xRectangle *)pValue, type);
+ pGC->clientClip = RegionFromRects(nRects, (xRectangle *)pValue, type);
free(pValue);
pValue = pGC->clientClip;
type = CT_REGION;
diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c
index 14a901a..8676c5f 100644
--- a/hw/xnest/Screen.c
+++ b/hw/xnest/Screen.c
@@ -290,6 +290,7 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
/* GC procedures */
pScreen->CreateGC = xnestCreateGC;
+ pScreen->ChangeClip = xnestChangeClip;
pScreen->DestroyClip = xnestDestroyClip;
/* Colormap procedures */
diff --git a/hw/xwin/wingc.c b/hw/xwin/wingc.c
index f5939fb..09e9968 100644
--- a/hw/xwin/wingc.c
+++ b/hw/xwin/wingc.c
@@ -60,18 +60,12 @@ static void
winDestroyGCNativeGDI (GCPtr pGC);
#if 0
-static void
-winChangeClipNativeGDI (GCPtr pGC, int nType, pointer pValue, int nRects);
-#endif
-
-#if 0
/* GC Handling Routines */
const GCFuncs winGCFuncs = {
winValidateGCNativeGDI,
winChangeGCNativeGDI,
winCopyGCNativeGDI,
winDestroyGCNativeGDI,
- winChangeClipNativeGDI,
};
#else
const GCFuncs winGCFuncs = {
@@ -79,7 +73,6 @@ const GCFuncs winGCFuncs = {
miChangeGC,
miCopyGC,
winDestroyGCNativeGDI,
- miChangeClip,
};
#endif
@@ -214,12 +207,3 @@ winDestroyGCNativeGDI (GCPtr pGC)
/* Invalidate the GC privates pointer */
winSetGCPriv (pGC, NULL);
}
-
-#if 0
-/* See Porting Layer Definition - p. 46 */
-static void
-winChangeClipNativeGDI (GCPtr pGC, int nType, pointer pValue, int nRects)
-{
-
-}
-#endif
diff --git a/include/gcstruct.h b/include/gcstruct.h
index 02341bf..3534e2e 100644
--- a/include/gcstruct.h
+++ b/include/gcstruct.h
@@ -82,12 +82,6 @@ typedef struct _GCFuncs {
void (* DestroyGC)(
GCPtr /*pGC*/);
-
- void (* ChangeClip)(
- GCPtr /*pGC*/,
- int /*type*/,
- pointer /*pvalue*/,
- int /*nrects*/);
} GCFuncs;
/*
diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index 12ef071..fcc6167 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -264,6 +264,12 @@ typedef Bool (* SetCursorPositionProcPtr)(
typedef Bool (* CreateGCProcPtr)(
GCPtr /*pGC*/);
+typedef void (* ChangeClipProcPtr)(
+ GCPtr /*pGC*/,
+ int /*type*/,
+ pointer /*value*/,
+ int /*nrects*/);
+
typedef void (* DestroyClipProcPtr)(
GCPtr /*pGC*/);
@@ -486,6 +492,7 @@ typedef struct _Screen {
/* GC procedures */
CreateGCProcPtr CreateGC;
+ ChangeClipProcPtr ChangeClip;
DestroyClipProcPtr DestroyClip;
/* Colormap procedures */
diff --git a/mi/mibitblt.c b/mi/mibitblt.c
index 49e17bd..da313dc 100644
--- a/mi/mibitblt.c
+++ b/mi/mibitblt.c
@@ -443,7 +443,7 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc,
prgnSrcClip = RegionCreate(NULL, 0);
RegionCopy(prgnSrcClip, prgnSrc);
RegionTranslate(prgnSrcClip, srcx, 0);
- (*pGCT->funcs->ChangeClip)(pGCT, CT_REGION, prgnSrcClip, 0);
+ (*pGCT->pScreen->ChangeClip)(pGCT, CT_REGION, prgnSrcClip, 0);
ValidateGC((DrawablePtr)pPixmap, pGCT);
/* Since we know pDraw is always a pixmap, we never need to think
@@ -528,7 +528,7 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc,
ValidateGC(pDraw, pGC);
/* put what we hope is a smaller clip region back in the scratch gc */
- (*pGCT->funcs->ChangeClip)(pGCT, CT_NONE, NULL, 0);
+ (*pGCT->pScreen->ChangeClip)(pGCT, CT_NONE, NULL, 0);
FreeScratchGC(pGCT);
(*pDraw->pScreen->DestroyPixmap)(pPixmap);
diff --git a/mi/migc.c b/mi/migc.c
index f6e8979..9cb8b19 100644
--- a/mi/migc.c
+++ b/mi/migc.c
@@ -81,8 +81,7 @@ miChangeClip( GCPtr pGC, int type, pointer pvalue, int nrects)
if (type == CT_PIXMAP)
{
/* convert the pixmap to a region */
- pGC->clientClip = (pointer) BitmapToRegion(pGC->pScreen,
- (PixmapPtr) pvalue);
+ pGC->clientClip = BitmapToRegion(pGC->pScreen, (PixmapPtr) pvalue);
(*pGC->pScreen->DestroyPixmap) (pvalue);
}
else if (type == CT_REGION)
@@ -92,9 +91,7 @@ miChangeClip( GCPtr pGC, int type, pointer pvalue, int nrects)
}
else if (type != CT_NONE)
{
- pGC->clientClip = (pointer) RegionFromRects(nrects,
- (xRectangle *) pvalue,
- type);
+ pGC->clientClip = RegionFromRects(nrects, (xRectangle *) pvalue, type);
free(pvalue);
}
pGC->clientClipType = (type != CT_NONE && pGC->clientClip) ? CT_REGION : CT_NONE;
diff --git a/miext/cw/cw.c b/miext/cw/cw.c
index 9c0a08b..d3d7514 100644
--- a/miext/cw/cw.c
+++ b/miext/cw/cw.c
@@ -61,15 +61,12 @@ static void
cwCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst);
static void
cwDestroyGC(GCPtr pGC);
-static void
-cwChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects);
GCFuncs cwGCFuncs = {
cwValidateGC,
cwChangeGC,
cwCopyGC,
cwDestroyGC,
- cwChangeClip,
};
/* Find the real drawable to draw to, and provide offsets that will translate
@@ -190,8 +187,8 @@ cwValidateGC(GCPtr pGC, unsigned long stateChanges, DrawablePtr pDrawable)
* offset for it.
*/
- (*pBackingGC->funcs->ChangeClip) (pBackingGC, CT_REGION,
- (pointer) pCompositeClip, 0);
+ (*pBackingGC->pScreen->ChangeClip) (pBackingGC, CT_REGION,
+ (pointer) pCompositeClip, 0);
vals[0].val = x_off - pDrawable->x;
vals[1].val = y_off - pDrawable->y;
@@ -264,18 +261,6 @@ cwDestroyGC(GCPtr pGC)
/* leave it unwrapped */
}
-static void
-cwChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects)
-{
- cwGCPtr pPriv = (cwGCPtr)dixLookupPrivate(&pGC->devPrivates, cwGCKey);
-
- FUNC_PROLOGUE(pGC, pPriv);
-
- (*pGC->funcs->ChangeClip)(pGC, type, pvalue, nrects);
-
- FUNC_EPILOGUE(pGC, pPriv);
-}
-
/*
* Screen wrappers.
*/
@@ -394,7 +379,7 @@ cwCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
-pBackingPixmap->screen_x,
-pBackingPixmap->screen_y);
- (*pGC->funcs->ChangeClip) (pGC, CT_REGION, pClip, 0);
+ (*pGC->pScreen->ChangeClip) (pGC, CT_REGION, pClip, 0);
ValidateGC(&pBackingPixmap->drawable, pGC);
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index dcd7491..a24b6cc 100644
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -383,11 +383,9 @@ static void damageValidateGC(GCPtr, unsigned long, DrawablePtr);
static void damageChangeGC(GCPtr, unsigned long);
static void damageCopyGC(GCPtr, unsigned long, GCPtr);
static void damageDestroyGC(GCPtr);
-static void damageChangeClip(GCPtr, int, pointer, int);
static GCFuncs damageGCFuncs = {
damageValidateGC, damageChangeGC, damageCopyGC, damageDestroyGC,
- damageChangeClip,
};
static GCOps damageGCOps;
@@ -468,17 +466,6 @@ damageCopyGC (GCPtr pGCSrc,
DAMAGE_GC_FUNC_EPILOGUE (pGCDst);
}
-static void
-damageChangeClip (GCPtr pGC,
- int type,
- pointer pvalue,
- int nrects)
-{
- DAMAGE_GC_FUNC_PROLOGUE (pGC);
- (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
- DAMAGE_GC_FUNC_EPILOGUE (pGC);
-}
-
#define TRIM_BOX(box, pGC) if (pGC->pCompositeClip) { \
BoxPtr extents = &pGC->pCompositeClip->extents;\
if(box.x1 < extents->x1) box.x1 = extents->x1; \
diff --git a/miext/rootless/rootlessGC.c b/miext/rootless/rootlessGC.c
index 850f76f..93080c7 100644
--- a/miext/rootless/rootlessGC.c
+++ b/miext/rootless/rootlessGC.c
@@ -56,8 +56,6 @@ static void RootlessValidateGC(GCPtr pGC, unsigned long changes,
static void RootlessChangeGC(GCPtr pGC, unsigned long mask);
static void RootlessCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst);
static void RootlessDestroyGC(GCPtr pGC);
-static void RootlessChangeClip(GCPtr pGC, int type, pointer pvalue,
- int nrects);
Bool RootlessCreateGC(GCPtr pGC);
@@ -66,7 +64,6 @@ GCFuncs rootlessGCFuncs = {
RootlessChangeGC,
RootlessCopyGC,
RootlessDestroyGC,
- RootlessChangeClip,
};
// GC operations
@@ -367,13 +364,6 @@ static void RootlessDestroyGC(GCPtr pGC)
GCFUNC_WRAP(pGC);
}
-static void RootlessChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects)
-{
- GCFUNC_UNWRAP(pGC);
- pGC->funcs->ChangeClip(pGC, type, pvalue, nrects);
- GCFUNC_WRAP(pGC);
-}
-
/*
* GC ops
*
diff --git a/render/mirect.c b/render/mirect.c
index 4fb347a..dbe82e5 100644
--- a/render/mirect.c
+++ b/render/mirect.c
@@ -64,9 +64,8 @@ miColorRects (PicturePtr pDst,
mask |= GCClipXOrigin|GCClipYOrigin;
pClip = RegionCreate(NULL, 1);
- RegionCopy(pClip,
- (RegionPtr) pClipPict->clientClip);
- (*pGC->funcs->ChangeClip) (pGC, CT_REGION, pClip, 0);
+ RegionCopy(pClip, (RegionPtr) pClipPict->clientClip);
+ (*pGC->pScreen->ChangeClip) (pGC, CT_REGION, pClip, 0);
}
ChangeGC (NullClient, pGC, mask, tmpval);
diff --git a/xfixes/region.c b/xfixes/region.c
index 4c22637..068b349 100644
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -623,7 +623,7 @@ ProcXFixesSetGCClipRegion (ClientPtr client)
vals[0].val = stuff->xOrigin;
vals[1].val = stuff->yOrigin;
ChangeGC (NullClient, pGC, GCClipXOrigin|GCClipYOrigin, vals);
- (*pGC->funcs->ChangeClip)(pGC, pRegion ? CT_REGION : CT_NONE, (pointer)pRegion, 0);
+ (*pGC->pScreen->ChangeClip)(pGC, pRegion ? CT_REGION : CT_NONE, (pointer)pRegion, 0);
return Success;
}
--
1.7.6.4
More information about the xorg-devel
mailing list