diff options
author | Adam Jackson <ajax@redhat.com> | 2017-01-23 13:57:48 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2017-01-23 13:58:35 -0500 |
commit | 4a154ae5d62baed954edc1ec2efda843dce74427 (patch) | |
tree | a93b7907b2c7dba5b1ab1149b21142a6dd79c69e | |
parent | 459ba084001d9337a643df8811efa19a2d9d49f9 (diff) |
dix: Move {Change,Copy,Destroy}Clip from GCFuncs to Screengc-rework
There are only two behaviors here. Xnest and Xdmx forward the clip list
to the backing server, other DDXes use mi. But a layer like damage has
to wrap everything in the GCFuncs vtable even though it really only
cares about ValidateGC.
Since none of this varies within a screen, we can move the clip
management funcs up to the ScreenRec and eliminate the empty wrappers.
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | Xext/panoramiX.c | 28 | ||||
-rw-r--r-- | dix/gc.c | 12 | ||||
-rw-r--r-- | exa/exa.c | 39 | ||||
-rw-r--r-- | fb/fbgc.c | 3 | ||||
-rw-r--r-- | glamor/glamor_core.c | 3 | ||||
-rw-r--r-- | hw/dmx/dmx.h | 2 | ||||
-rw-r--r-- | hw/dmx/dmxgc.c | 24 | ||||
-rw-r--r-- | hw/dmx/dmxscrinit.c | 4 | ||||
-rw-r--r-- | hw/xfree86/common/xf86VGAarbiter.c | 27 | ||||
-rw-r--r-- | hw/xfree86/common/xf86VGAarbiterPriv.h | 4 | ||||
-rw-r--r-- | hw/xfree86/drivers/modesetting/dri2.c | 2 | ||||
-rw-r--r-- | hw/xnest/GC.c | 3 | ||||
-rw-r--r-- | hw/xnest/Screen.c | 3 | ||||
-rw-r--r-- | include/gcstruct.h | 10 | ||||
-rw-r--r-- | include/scrnintstr.h | 6 | ||||
-rw-r--r-- | mi/mibitblt.c | 4 | ||||
-rw-r--r-- | mi/migc.c | 6 | ||||
-rw-r--r-- | mi/miscrinit.c | 4 | ||||
-rw-r--r-- | miext/damage/damage.c | 28 | ||||
-rw-r--r-- | miext/rootless/rootlessGC.c | 30 | ||||
-rw-r--r-- | present/present.c | 4 | ||||
-rw-r--r-- | render/mirect.c | 2 | ||||
-rw-r--r-- | xfixes/region.c | 3 |
23 files changed, 42 insertions, 209 deletions
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index 209df292c..edd916def 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -130,13 +130,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, void *, int); -static void XineramaDestroyClip(GCPtr); -static void XineramaCopyClip(GCPtr, GCPtr); static const GCFuncs XineramaGCFuncs = { XineramaValidateGC, XineramaChangeGC, XineramaCopyGC, XineramaDestroyGC, - XineramaChangeClip, XineramaDestroyClip, XineramaCopyClip }; #define Xinerama_GC_FUNC_PROLOGUE(pGC)\ @@ -293,30 +289,6 @@ XineramaCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) Xinerama_GC_FUNC_EPILOGUE(pGCDst); } -static void -XineramaChangeClip(GCPtr pGC, int type, void *pvalue, int nrects) -{ - Xinerama_GC_FUNC_PROLOGUE(pGC); - (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); - Xinerama_GC_FUNC_EPILOGUE(pGC); -} - -static void -XineramaCopyClip(GCPtr pgcDst, GCPtr pgcSrc) -{ - Xinerama_GC_FUNC_PROLOGUE(pgcDst); - (*pgcDst->funcs->CopyClip) (pgcDst, pgcSrc); - Xinerama_GC_FUNC_EPILOGUE(pgcDst); -} - -static void -XineramaDestroyClip(GCPtr pGC) -{ - Xinerama_GC_FUNC_PROLOGUE(pGC); - (*pGC->funcs->DestroyClip) (pGC); - Xinerama_GC_FUNC_EPILOGUE(pGC); -} - int XineramaDeleteResource(void *data, XID id) { @@ -340,8 +340,8 @@ ChangeGC(ClientPtr client, GC * pGC, BITS32 mask, ChangeGCValPtr pUnion) } pPixmap->refcnt++; } - (*pGC->funcs->ChangeClip) (pGC, pPixmap ? CT_PIXMAP : CT_NONE, - (void *) pPixmap, 0); + pGC->pScreen->ChangeClip(pGC, pPixmap ? CT_PIXMAP : CT_NONE, + pPixmap, 0); break; case GCDashOffset: NEXTVAL(INT16, pGC->dashOffset); @@ -712,7 +712,7 @@ CopyGC(GC * pgcSrc, GC * pgcDst, BITS32 mask) pgcDst->clipOrg.y = pgcSrc->clipOrg.y; break; case GCClipMask: - (*pgcDst->funcs->CopyClip) (pgcDst, pgcSrc); + pgcDst->pScreen->CopyClip(pgcDst, pgcSrc); break; case GCDashOffset: pgcDst->dashOffset = pgcSrc->dashOffset; @@ -770,7 +770,7 @@ FreeGC(void *value, XID gid) GCPtr pGC = (GCPtr) value; CloseFont(pGC->font, (Font) 0); - (*pGC->funcs->DestroyClip) (pGC); + pGC->pScreen->DestroyClip(pGC); if (!pGC->tileIsPixel) (*pGC->pScreen->DestroyPixmap) (pGC->tile.pixmap); @@ -1022,7 +1022,7 @@ SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects, if (size) memmove((char *) prectsNew, (char *) prects, size); - (*pGC->funcs->ChangeClip) (pGC, newct, (void *) prectsNew, nrects); + pGC->pScreen->ChangeClip(pGC, newct, prectsNew, nrects); if (pGC->funcs->ChangeGC) (*pGC->funcs->ChangeGC) (pGC, GCClipXOrigin | GCClipYOrigin | GCClipMask); @@ -1065,7 +1065,7 @@ GetScratchGC(unsigned depth, ScreenPtr pScreen) pGC->clipOrg.x = 0; pGC->clipOrg.y = 0; if (pGC->clientClip) - (*pGC->funcs->ChangeClip) (pGC, CT_NONE, NULL, 0); + pGC->pScreen->ChangeClip(pGC, CT_NONE, NULL, 0); pGC->stateChanges = GCAllBits; return pGC; } @@ -474,23 +474,11 @@ static void static void exaCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); -static void - exaChangeClip(GCPtr pGC, int type, void *pvalue, int nrects); - -static void - exaCopyClip(GCPtr pGCDst, GCPtr pGCSrc); - -static void - exaDestroyClip(GCPtr pGC); - const GCFuncs exaGCFuncs = { exaValidateGC, exaChangeGC, exaCopyGC, exaDestroyGC, - exaChangeClip, - exaDestroyClip, - exaCopyClip }; static void @@ -578,33 +566,6 @@ exaCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) swap(pExaGC, pGCDst, funcs); } -static void -exaChangeClip(GCPtr pGC, int type, void *pvalue, int nrects) -{ - ExaGCPriv(pGC); - swap(pExaGC, pGC, funcs); - (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); - swap(pExaGC, pGC, funcs); -} - -static void -exaCopyClip(GCPtr pGCDst, GCPtr pGCSrc) -{ - ExaGCPriv(pGCDst); - swap(pExaGC, pGCDst, funcs); - (*pGCDst->funcs->CopyClip) (pGCDst, pGCSrc); - swap(pExaGC, pGCDst, funcs); -} - -static void -exaDestroyClip(GCPtr pGC) -{ - ExaGCPriv(pGC); - swap(pExaGC, pGC, funcs); - (*pGC->funcs->DestroyClip) (pGC); - swap(pExaGC, pGC, funcs); -} - /** * exaCreateGC makes a new GC and hooks up its funcs handler, so that * exaValidateGC() will get called. @@ -33,9 +33,6 @@ const GCFuncs fbGCFuncs = { miChangeGC, miCopyGC, miDestroyGC, - miChangeClip, - miDestroyClip, - miCopyClip, }; const GCOps fbGCOps = { diff --git a/glamor/glamor_core.c b/glamor/glamor_core.c index 7b2b39633..493b2cf58 100644 --- a/glamor/glamor_core.c +++ b/glamor/glamor_core.c @@ -307,9 +307,6 @@ static GCFuncs glamor_gc_funcs = { miChangeGC, miCopyGC, glamor_destroy_gc, - miChangeClip, - miDestroyClip, - miCopyClip }; /** diff --git a/hw/dmx/dmx.h b/hw/dmx/dmx.h index 7242e4380..dbd587983 100644 --- a/hw/dmx/dmx.h +++ b/hw/dmx/dmx.h @@ -198,6 +198,8 @@ typedef struct _DMXScreenInfo { SaveScreenProcPtr SaveScreen; CreateGCProcPtr CreateGC; + ChangeClipProcPtr ChangeClip; + DestroyClipProcPtr DestroyClip; CreateWindowProcPtr CreateWindow; DestroyWindowProcPtr DestroyWindow; diff --git a/hw/dmx/dmxgc.c b/hw/dmx/dmxgc.c index c4789a607..453954af3 100644 --- a/hw/dmx/dmxgc.c +++ b/hw/dmx/dmxgc.c @@ -54,9 +54,6 @@ static const GCFuncs dmxGCFuncs = { dmxChangeGC, dmxCopyGC, dmxDestroyGC, - dmxChangeClip, - dmxDestroyClip, - dmxCopyClip, }; static const GCOps dmxGCOps = { @@ -387,8 +384,8 @@ dmxChangeClip(GCPtr pGC, int type, void *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); + pGC->pScreen->ChangeClip(pGC, type, pvalue, nrects); /* Set the client clip on the back-end server */ if (!pGC->clientClip) { @@ -415,7 +412,7 @@ dmxChangeClip(GCPtr pGC, int type, void *pvalue, int nrects) } } - DMX_GC_FUNC_EPILOGUE(pGC); + DMX_WRAP(ChangeClip, dmxChangeClip, dmxScreen, pScreen); } /** Destroy a GC's clip rects. */ @@ -426,21 +423,12 @@ dmxDestroyClip(GCPtr pGC) DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; dmxGCPrivPtr pGCPriv = DMX_GET_GC_PRIV(pGC); - DMX_GC_FUNC_PROLOGUE(pGC); - pGC->funcs->DestroyClip(pGC); + DMX_UNWRAP(DestroyClip, dmxScreen, pScreen); + pGC->pScreen->DestroyClip(pGC); /* Set the client clip on the back-end server to None */ if (dmxScreen->beDisplay) XSetClipMask(dmxScreen->beDisplay, pGCPriv->gc, None); - DMX_GC_FUNC_EPILOGUE(pGC); -} - -/** Copy a GC's clip rects. */ -void -dmxCopyClip(GCPtr pGCDst, GCPtr pGCSrc) -{ - DMX_GC_FUNC_PROLOGUE(pGCDst); - pGCDst->funcs->CopyClip(pGCDst, pGCSrc); - DMX_GC_FUNC_EPILOGUE(pGCDst); + DMX_WRAP(DestroyClip, dmxDestroyClip, dmxScreen, pScreen); } diff --git a/hw/dmx/dmxscrinit.c b/hw/dmx/dmxscrinit.c index e441dceef..8c54885b6 100644 --- a/hw/dmx/dmxscrinit.c +++ b/hw/dmx/dmxscrinit.c @@ -269,6 +269,8 @@ dmxScreenInit(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 */ DMX_WRAP(CreateWindow, dmxCreateWindow, dmxScreen, pScreen); @@ -392,6 +394,8 @@ dmxCloseScreen(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); DMX_UNWRAP(DestroyWindow, dmxScreen, pScreen); diff --git a/hw/xfree86/common/xf86VGAarbiter.c b/hw/xfree86/common/xf86VGAarbiter.c index 40f241aee..9a5873484 100644 --- a/hw/xfree86/common/xf86VGAarbiter.c +++ b/hw/xfree86/common/xf86VGAarbiter.c @@ -38,8 +38,7 @@ static GCFuncs VGAarbiterGCFuncs = { VGAarbiterValidateGC, VGAarbiterChangeGC, VGAarbiterCopyGC, - VGAarbiterDestroyGC, VGAarbiterChangeClip, VGAarbiterDestroyClip, - VGAarbiterCopyClip + VGAarbiterDestroyGC }; static GCOps VGAarbiterGCOps = { @@ -583,30 +582,6 @@ VGAarbiterCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) GC_WRAP(pGCDst); } -static void -VGAarbiterChangeClip(GCPtr pGC, int type, void *pvalue, int nrects) -{ - GC_UNWRAP(pGC); - (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); - GC_WRAP(pGC); -} - -static void -VGAarbiterCopyClip(GCPtr pgcDst, GCPtr pgcSrc) -{ - GC_UNWRAP(pgcDst); - (*pgcDst->funcs->CopyClip) (pgcDst, pgcSrc); - GC_WRAP(pgcDst); -} - -static void -VGAarbiterDestroyClip(GCPtr pGC) -{ - GC_UNWRAP(pGC); - (*pGC->funcs->DestroyClip) (pGC); - GC_WRAP(pGC); -} - /* GC Ops */ static void VGAarbiterFillSpans(DrawablePtr pDraw, diff --git a/hw/xfree86/common/xf86VGAarbiterPriv.h b/hw/xfree86/common/xf86VGAarbiterPriv.h index 09be10aa3..6bd65292c 100644 --- a/hw/xfree86/common/xf86VGAarbiterPriv.h +++ b/hw/xfree86/common/xf86VGAarbiterPriv.h @@ -190,10 +190,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, void *pvalue, - int nrects); -static void VGAarbiterDestroyClip(GCPtr pGC); -static void VGAarbiterCopyClip(GCPtr pgcDst, GCPtr pgcSrc); /* GC ops */ static void VGAarbiterFillSpans(DrawablePtr pDraw, GC * pGC, int nInit, diff --git a/hw/xfree86/drivers/modesetting/dri2.c b/hw/xfree86/drivers/modesetting/dri2.c index 8944ef136..7c50ac376 100644 --- a/hw/xfree86/drivers/modesetting/dri2.c +++ b/hw/xfree86/drivers/modesetting/dri2.c @@ -303,7 +303,7 @@ ms_dri2_copy_region2(ScreenPtr screen, DrawablePtr drawable, RegionPtr pRegion, REGION_COPY(screen, pCopyClip, pRegion); if (translate) REGION_TRANSLATE(screen, pCopyClip, off_x, off_y); - (*gc->funcs->ChangeClip) (gc, CT_REGION, pCopyClip, 0); + screen->ChangeClip(gc, CT_REGION, pCopyClip, 0); ValidateGC(dst, gc); /* It's important that this copy gets submitted before the direct diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c index ecfa61e39..ba39d25e8 100644 --- a/hw/xnest/GC.c +++ b/hw/xnest/GC.c @@ -42,9 +42,6 @@ static GCFuncs xnestFuncs = { xnestChangeGC, xnestCopyGC, xnestDestroyGC, - xnestChangeClip, - xnestDestroyClip, - xnestCopyClip, }; static GCOps xnestOps = { diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index 30c6a4623..7c0b1db75 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -292,6 +292,9 @@ xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) /* GC procedures */ pScreen->CreateGC = xnestCreateGC; + pScreen->ChangeClip = xnestChangeClip; + pScreen->DestroyClip = xnestDestroyClip; + pScreen->CopyClip = xnestCopyClip; /* Colormap procedures */ diff --git a/include/gcstruct.h b/include/gcstruct.h index e48d61045..0a88f28bf 100644 --- a/include/gcstruct.h +++ b/include/gcstruct.h @@ -75,16 +75,6 @@ typedef struct _GCFuncs { GCPtr /*pGCDst */ ); void (*DestroyGC) (GCPtr /*pGC */ ); - - void (*ChangeClip) (GCPtr pGC, - int type, - void *pvalue, - int nrects); - - void (*DestroyClip) (GCPtr /*pGC */ ); - - void (*CopyClip) (GCPtr /*pgcDst */ , - GCPtr /*pgcSrc */ ); } GCFuncs; /* diff --git a/include/scrnintstr.h b/include/scrnintstr.h index f174549c4..e9be53294 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -246,6 +246,9 @@ typedef void (*CurserConfinedToProcPtr) (DeviceIntPtr /* pDev */ , WindowPtr /*pWindow */ ); typedef Bool (*CreateGCProcPtr) (GCPtr /*pGC */ ); +typedef void (*ChangeClipProcPtr)(GCPtr pGC, int type, void *value, int nrects); +typedef void (*DestroyClipProcPtr)(GCPtr pGC); +typedef void (*CopyClipProcPtr)(GCPtr pgcDst, GCPtr pgcSrc); typedef Bool (*CreateColormapProcPtr) (ColormapPtr /*pColormap */ ); @@ -570,6 +573,9 @@ typedef struct _Screen { /* GC procedures */ CreateGCProcPtr CreateGC; + ChangeClipProcPtr ChangeClip; + DestroyClipProcPtr DestroyClip; + CopyClipProcPtr CopyClip; /* Colormap procedures */ diff --git a/mi/mibitblt.c b/mi/mibitblt.c index 28296a449..b675fc9e1 100644 --- a/mi/mibitblt.c +++ b/mi/mibitblt.c @@ -414,7 +414,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 @@ -497,7 +497,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); @@ -63,7 +63,7 @@ miDestroyClip(GCPtr pGC) void miChangeClip(GCPtr pGC, int type, void *pvalue, int nrects) { - (*pGC->funcs->DestroyClip) (pGC); + pGC->pScreen->DestroyClip(pGC); if (type == CT_PIXMAP) { /* convert the pixmap to a region */ pGC->clientClip = BitmapToRegion(pGC->pScreen, (PixmapPtr) pvalue); @@ -86,9 +86,9 @@ miCopyClip(GCPtr pgcDst, GCPtr pgcSrc) if (pgcSrc->clientClip) { RegionPtr prgnNew = RegionCreate(NULL, 1); RegionCopy(prgnNew, (RegionPtr) (pgcSrc->clientClip)); - (*pgcDst->funcs->ChangeClip) (pgcDst, CT_REGION, prgnNew, 0); + (*pgcDst->pScreen->ChangeClip) (pgcDst, CT_REGION, prgnNew, 0); } else { - (*pgcDst->funcs->ChangeClip) (pgcDst, CT_NONE, NULL, 0); + (*pgcDst->pScreen->ChangeClip) (pgcDst, CT_NONE, NULL, 0); } } diff --git a/mi/miscrinit.c b/mi/miscrinit.c index 9c6af0dc7..2464b0ce3 100644 --- a/mi/miscrinit.c +++ b/mi/miscrinit.c @@ -34,6 +34,7 @@ from The Open Group. #include "servermd.h" #include "misc.h" #include "mi.h" +#include "migc.h" #include "scrnintstr.h" #include "pixmapstr.h" #include "dix.h" @@ -273,6 +274,9 @@ miScreenInit(ScreenPtr pScreen, void *pbits, /* pointer to screen bits */ pScreen->SetShape = miSetShape; pScreen->MarkUnrealizedWindow = miMarkUnrealizedWindow; pScreen->XYToWindow = miXYToWindow; + pScreen->ChangeClip = miChangeClip; + pScreen->CopyClip = miCopyClip; + pScreen->DestroyClip = miDestroyClip; miSetZeroLineBias(pScreen, DEFAULTZEROLINEBIAS); diff --git a/miext/damage/damage.c b/miext/damage/damage.c index d6a36142d..4405de7b6 100644 --- a/miext/damage/damage.c +++ b/miext/damage/damage.c @@ -327,13 +327,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, void *, int); -static void damageDestroyClip(GCPtr); -static void damageCopyClip(GCPtr, GCPtr); static GCFuncs damageGCFuncs = { damageValidateGC, damageChangeGC, damageCopyGC, damageDestroyGC, - damageChangeClip, damageDestroyClip, damageCopyClip }; static GCOps damageGCOps; @@ -410,30 +406,6 @@ damageCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) DAMAGE_GC_FUNC_EPILOGUE(pGCDst); } -static void -damageChangeClip(GCPtr pGC, int type, void *pvalue, int nrects) -{ - DAMAGE_GC_FUNC_PROLOGUE(pGC); - (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); - DAMAGE_GC_FUNC_EPILOGUE(pGC); -} - -static void -damageCopyClip(GCPtr pgcDst, GCPtr pgcSrc) -{ - DAMAGE_GC_FUNC_PROLOGUE(pgcDst); - (*pgcDst->funcs->CopyClip) (pgcDst, pgcSrc); - DAMAGE_GC_FUNC_EPILOGUE(pgcDst); -} - -static void -damageDestroyClip(GCPtr pGC) -{ - DAMAGE_GC_FUNC_PROLOGUE(pGC); - (*pGC->funcs->DestroyClip) (pGC); - 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 235b3ab7c..beafb71a1 100644 --- a/miext/rootless/rootlessGC.c +++ b/miext/rootless/rootlessGC.c @@ -55,9 +55,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, void *pvalue, int nrects); -static void RootlessDestroyClip(GCPtr pGC); -static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc); Bool RootlessCreateGC(GCPtr pGC); @@ -66,9 +63,6 @@ GCFuncs rootlessGCFuncs = { RootlessChangeGC, RootlessCopyGC, RootlessDestroyGC, - RootlessChangeClip, - RootlessDestroyClip, - RootlessCopyClip, }; // GC operations @@ -367,30 +361,6 @@ RootlessDestroyGC(GCPtr pGC) GCFUNC_WRAP(pGC); } -static void -RootlessChangeClip(GCPtr pGC, int type, void *pvalue, int nrects) -{ - GCFUNC_UNWRAP(pGC); - pGC->funcs->ChangeClip(pGC, type, pvalue, nrects); - GCFUNC_WRAP(pGC); -} - -static void -RootlessDestroyClip(GCPtr pGC) -{ - GCFUNC_UNWRAP(pGC); - pGC->funcs->DestroyClip(pGC); - GCFUNC_WRAP(pGC); -} - -static void -RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc) -{ - GCFUNC_UNWRAP(pgcDst); - pgcDst->funcs->CopyClip(pgcDst, pgcSrc); - GCFUNC_WRAP(pgcDst); -} - /* * GC ops * diff --git a/present/present.c b/present/present.c index ef8904537..e8b3d629b 100644 --- a/present/present.c +++ b/present/present.c @@ -89,7 +89,7 @@ present_copy_region(DrawablePtr drawable, ChangeGC(serverClient, gc, GCClipXOrigin|GCClipYOrigin, changes); - (*gc->funcs->ChangeClip)(gc, CT_REGION, update, 0); + screen->ChangeClip(gc, CT_REGION, update, 0); } ValidateGC(drawable, gc); (*gc->ops->CopyArea)(&pixmap->drawable, @@ -99,7 +99,7 @@ present_copy_region(DrawablePtr drawable, pixmap->drawable.width, pixmap->drawable.height, x_off, y_off); if (update) - (*gc->funcs->ChangeClip)(gc, CT_NONE, NULL, 0); + screen->ChangeClip(gc, CT_NONE, NULL, 0); FreeScratchGC(gc); } diff --git a/render/mirect.c b/render/mirect.c index a36d1d6e3..4c4b3f899 100644 --- a/render/mirect.c +++ b/render/mirect.c @@ -61,7 +61,7 @@ miColorRects(PicturePtr pDst, pClip = RegionCreate(NULL, 1); RegionCopy(pClip, (RegionPtr) pClipPict->clientClip); - (*pGC->funcs->ChangeClip) (pGC, CT_REGION, pClip, 0); + pGC->pScreen->ChangeClip(pGC, CT_REGION, pClip, 0); } ChangeGC(NullClient, pGC, mask, tmpval); diff --git a/xfixes/region.c b/xfixes/region.c index dd74d7f7e..cd8d43177 100644 --- a/xfixes/region.c +++ b/xfixes/region.c @@ -616,8 +616,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, - (void *) pRegion, 0); + pGC->pScreen->ChangeClip(pGC, pRegion ? CT_REGION : CT_NONE, pRegion, 0); return Success; } |