diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-05-07 19:38:05 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2010-05-13 17:14:07 -0700 |
commit | 6a84cd943430cfc9df55c83aef6a7f8dea6dbb94 (patch) | |
tree | b6b75bd36bc05c394e3b1e52edaccde1d52a136d | |
parent | 2d7eb4a19b773d0406c0c2e018a7da97f3565fd5 (diff) |
Replace dixChangeGC with calls directly to the right variant.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | composite/compalloc.c | 2 | ||||
-rw-r--r-- | dbe/dbe.c | 2 | ||||
-rw-r--r-- | dix/dispatch.c | 2 | ||||
-rw-r--r-- | dix/dixfonts.c | 8 | ||||
-rw-r--r-- | dix/gc.c | 71 | ||||
-rw-r--r-- | dix/glyphcurs.c | 5 | ||||
-rw-r--r-- | dix/window.c | 13 | ||||
-rw-r--r-- | fb/fbseg.c | 2 | ||||
-rw-r--r-- | glx/glxdriswrast.c | 4 | ||||
-rw-r--r-- | hw/kdrive/ephyr/ephyr_draw.c | 4 | ||||
-rw-r--r-- | hw/kdrive/src/kxv.c | 2 | ||||
-rw-r--r-- | hw/xfree86/common/xf86xv.c | 4 | ||||
-rw-r--r-- | hw/xfree86/xaa/xaaPCache.c | 2 | ||||
-rw-r--r-- | include/gc.h | 9 | ||||
-rw-r--r-- | mi/miarc.c | 8 | ||||
-rw-r--r-- | mi/mibitblt.c | 23 | ||||
-rw-r--r-- | mi/midispcur.c | 10 | ||||
-rw-r--r-- | mi/miexpose.c | 6 | ||||
-rw-r--r-- | mi/miglblt.c | 8 | ||||
-rw-r--r-- | mi/mipolypnt.c | 4 | ||||
-rw-r--r-- | mi/miwideline.c | 12 | ||||
-rw-r--r-- | mi/miwideline.h | 4 | ||||
-rw-r--r-- | mi/mizerarc.c | 4 | ||||
-rw-r--r-- | miext/cw/cw.c | 8 | ||||
-rw-r--r-- | render/mirect.c | 4 | ||||
-rw-r--r-- | xfixes/region.c | 2 |
26 files changed, 103 insertions, 120 deletions
diff --git a/composite/compalloc.c b/composite/compalloc.c index 7a8019e61..3694ab868 100644 --- a/composite/compalloc.c +++ b/composite/compalloc.c @@ -501,7 +501,7 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h) val.val = IncludeInferiors; ValidateGC(&pPixmap->drawable, pGC); - dixChangeGC (serverClient, pGC, GCSubwindowMode, NULL, &val); + ChangeGC (serverClient, pGC, GCSubwindowMode, &val); (*pGC->ops->CopyArea) (&pParent->drawable, &pPixmap->drawable, pGC, @@ -1283,7 +1283,7 @@ DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC) return(FALSE); } - return dixChangeGC(NullClient, pGC, gcmask, NULL, gcvalues) == 0; + return ChangeGC(NullClient, pGC, gcmask, gcvalues) == 0; } /* DbeSetupBackgroundPainter() */ diff --git a/dix/dispatch.c b/dix/dispatch.c index 4dc9ecd9d..d6a8a5aaf 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1537,7 +1537,7 @@ ProcChangeGC(ClientPtr client) if (len != Ones(stuff->mask)) return BadLength; - result = dixChangeGC(client, pGC, stuff->mask, (CARD32 *) &stuff[1], 0); + result = ChangeGCXIDs(client, pGC, stuff->mask, (CARD32 *) &stuff[1]); if (client->noClientException != Success) return(client->noClientException); else diff --git a/dix/dixfonts.c b/dix/dixfonts.c index 01123c3a9..585754b57 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -1263,7 +1263,7 @@ doPolyText(ClientPtr client, PTclosurePtr c) { ChangeGCVal val; val.ptr = pFont; - dixChangeGC(NullClient, c->pGC, GCFont, NULL, &val); + ChangeGC(NullClient, c->pGC, GCFont, &val); ValidateGC(c->pDraw, c->pGC); if (c->reqType == X_PolyText8) c->polyText = (PolyTextPtr) c->pGC->ops->PolyText8; @@ -1408,7 +1408,7 @@ bail: { ChangeGCVal val; val.ptr = pFont; - dixChangeGC(NullClient, origGC, GCFont, NULL, &val); + ChangeGC(NullClient, origGC, GCFont, &val); ValidateGC(c->pDraw, origGC); } @@ -1427,7 +1427,7 @@ bail: if (c->slept) { ClientWakeup(c->client); - dixChangeGC(NullClient, c->pGC, clearGCmask, NULL, clearGC); + ChangeGC(NullClient, c->pGC, clearGCmask, clearGC); /* Unreference the font from the scratch GC */ CloseFont(c->pGC->font, (Font)0); @@ -1584,7 +1584,7 @@ bail: if (c->slept) { ClientWakeup(c->client); - dixChangeGC(NullClient, c->pGC, clearGCmask, NULL, clearGC); + ChangeGC(NullClient, c->pGC, clearGCmask, clearGC); /* Unreference the font from the scratch GC */ CloseFont(c->pGC->font, (Font)0); @@ -82,48 +82,37 @@ ValidateGC(DrawablePtr pDraw, GC *pGC) } -/* dixChangeGC(client, pGC, mask, pC32, pUnion) - * - * This function was created as part of the Security extension - * implementation. The client performing the gc change must be passed so - * that access checks can be performed on any tiles, stipples, or fonts - * that are specified. ddxen can call this too; they should normally - * pass NullClient for the client since any access checking should have +/* + * ChangeGC/ChangeGCXIDs: + * + * The client performing the gc change must be passed so that access + * checks can be performed on any tiles, stipples, or fonts that are + * specified. ddxen can call this too; they should normally pass + * NullClient for the client since any access checking should have * already been done at a higher level. * - * You can pass the list of gc values via pC32 or pUnion, but not both; - * one of them must be NULL. If you don't need to pass any pointers, - * you can use either one: + * If you have any XIDs, you must use ChangeGCXIDs: * - * example calling dixChangeGC using pC32 parameter - * * CARD32 v[2]; - * v[0] = foreground; - * v[1] = background; - * dixChangeGC(client, pGC, GCForeground|GCBackground, v, NULL); - * - * example calling dixChangeGC using pUnion parameter; - * same effect as above - * - * ChangeGCVal v[2]; - * v[0].val = foreground; - * v[1].val = background; - * dixChangeGC(client, pGC, GCForeground|GCBackground, NULL, v); + * v[0] = FillTiled; + * v[1] = pid; + * ChangeGCXIDs(client, pGC, GCFillStyle|GCTile, v); * - * However, if you need to pass a pointer to a pixmap or font, you MUST - * use the pUnion parameter. + * However, if you need to pass a pointer to a pixmap or font, you must + * use ChangeGC: * - * example calling dixChangeGC passing pointers in the value list - * v[1].ptr is a pointer to a pixmap - * * ChangeGCVal v[2]; * v[0].val = FillTiled; * v[1].ptr = pPixmap; - * dixChangeGC(client, pGC, GCFillStyle|GCTile, NULL, v); + * ChangeGC(client, pGC, GCFillStyle|GCTile, v); * - * Note: we could have gotten by with just the pUnion parameter, but on - * 64 bit machines that would have forced us to copy the value list that - * comes in the ChangeGC request. + * If you have neither XIDs nor pointers, you can use either function, + * but ChangeGC will do less work. + * + * ChangeGCVal v[2]; + * v[0].val = foreground; + * v[1].val = background; + * ChangeGC(client, pGC, GCForeground|GCBackground, v); */ #define NEXTVAL(_type, _var) { \ @@ -133,7 +122,7 @@ ValidateGC(DrawablePtr pDraw, GC *pGC) #define NEXT_PTR(_type, _var) { \ _var = (_type)pUnion->ptr; pUnion++; } -static int +int ChangeGC(ClientPtr client, GC *pGC, BITS32 mask, ChangeGCValPtr pUnion) { BITS32 index2; @@ -430,7 +419,7 @@ static const struct { { GCClipMask, RT_PIXMAP, DixReadAccess }, }; -static int +int ChangeGCXIDs(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32) { ChangeGCVal vals[GCLastBit + 1]; @@ -466,14 +455,6 @@ ChangeGCXIDs(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32) return ChangeGC(client, pGC, mask, vals); } -int -dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pUnion) -{ - if (pC32) - return ChangeGCXIDs(client, pGC, mask, pC32); - return ChangeGC(client, pGC, mask, pUnion); -} - /* CreateGC(pDrawable, mask, pval, pStatus) creates a default GC for the given drawable, using mask to fill in any non-default values. @@ -557,7 +538,7 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus, if (!(*pGC->pScreen->CreateGC)(pGC)) *pStatus = BadAlloc; else if (mask) - *pStatus = dixChangeGC(client, pGC, mask, pval, NULL); + *pStatus = ChangeGCXIDs(client, pGC, mask, pval); else *pStatus = Success; @@ -600,7 +581,7 @@ CreateDefaultTile (GCPtr pGC) tmpval[0].val = GXcopy; tmpval[1].val = pGC->tile.pixel; tmpval[2].val = FillSolid; - (void)dixChangeGC(NullClient, pgcScratch, GCFunction | GCForeground | GCFillStyle, NULL, tmpval); + (void)ChangeGC(NullClient, pgcScratch, GCFunction | GCForeground | GCFillStyle, tmpval); ValidateGC((DrawablePtr)pTile, pgcScratch); rect.x = 0; rect.y = 0; @@ -941,7 +922,7 @@ CreateDefaultStipple(int screenNum) (*pScreen->DestroyPixmap)(pScreen->PixmapPerDepth[0]); return FALSE; } - (void)dixChangeGC(NullClient, pgcScratch, GCFunction|GCForeground|GCFillStyle, NULL, tmpval); + (void)ChangeGC(NullClient, pgcScratch, GCFunction|GCForeground|GCFillStyle, tmpval); ValidateGC((DrawablePtr)pScreen->PixmapPerDepth[0], pgcScratch); rect.x = 0; rect.y = 0; diff --git a/dix/glyphcurs.c b/dix/glyphcurs.c index f10400f7b..fa2aeca26 100644 --- a/dix/glyphcurs.c +++ b/dix/glyphcurs.c @@ -118,14 +118,13 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm, unsigned cha gcval[0].val = GXcopy; gcval[1].val = 0; gcval[2].ptr = (pointer)pfont; - dixChangeGC(NullClient, pGC, GCFunction | GCForeground | GCFont, - NULL, gcval); + ChangeGC(NullClient, pGC, GCFunction | GCForeground | GCFont, gcval); ValidateGC((DrawablePtr)ppix, pGC); (*pGC->ops->PolyFillRect)((DrawablePtr)ppix, pGC, 1, &rect); /* draw the glyph */ gcval[0].val = 1; - dixChangeGC(NullClient, pGC, GCForeground, NULL, gcval); + ChangeGC(NullClient, pGC, GCForeground, gcval); ValidateGC((DrawablePtr)ppix, pGC); (*pGC->ops->PolyText16)((DrawablePtr)ppix, pGC, cm->xhot, cm->yhot, 1, (unsigned short *)char2b); diff --git a/dix/window.c b/dix/window.c index 595c60856..57cebf46a 100644 --- a/dix/window.c +++ b/dix/window.c @@ -328,7 +328,7 @@ MakeRootTile(WindowPtr pWin) attributes[0].val = pScreen->whitePixel; attributes[1].val = pScreen->blackPixel; - (void)dixChangeGC(NullClient, pGC, GCForeground | GCBackground, NULL, attributes); + (void)ChangeGC(NullClient, pGC, GCForeground | GCBackground, attributes); } ValidateGC((DrawablePtr)pWin->background.pixmap, pGC); @@ -3763,8 +3763,7 @@ DrawLogo(WindowPtr pWin) } else { back[0].val = 0; back[1].val = 0; - dixChangeGC(NullClient, pGC, GCTileStipXOrigin|GCTileStipYOrigin, - NULL, back); + ChangeGC(NullClient, pGC, GCTileStipXOrigin|GCTileStipYOrigin, back); back[0].val = FillTiled; back[1].ptr = pWin->background.pixmap; bmask = GCFillStyle|GCTile; @@ -3802,7 +3801,7 @@ DrawLogo(WindowPtr pWin) poly[1].x = x + size-d31; poly[1].y = y; poly[2].x = x + 0; poly[2].y = y + size; poly[3].x = x + d31; poly[3].y = y + size; - dixChangeGC(NullClient, pGC, fmask, NULL, fore); + ChangeGC(NullClient, pGC, fmask, fore); ValidateGC(pDraw, pGC); (*pGC->ops->FillPolygon)(pDraw, pGC, Convex, CoordModeOrigin, 4, poly); @@ -3821,7 +3820,7 @@ DrawLogo(WindowPtr pWin) poly[1].x = x + size / 2; poly[1].y = y + size/2; poly[2].x = x + (size/2)+(d31-(d31/2)); poly[2].y = y + size/2; poly[3].x = x + d31; poly[3].y = y + size; - dixChangeGC(NullClient, pGC, bmask, NULL, back); + ChangeGC(NullClient, pGC, bmask, back); ValidateGC(pDraw, pGC); (*pGC->ops->FillPolygon)(pDraw, pGC, Convex, CoordModeOrigin, 4, poly); @@ -3860,7 +3859,7 @@ DrawLogo(WindowPtr pWin) poly[1].x = x + size/4; poly[1].y = y; poly[2].x = x + size; poly[2].y = y + size; poly[3].x = x + size - size/4; poly[3].y = y + size; - dixChangeGC(NullClient, pGC, fmask, NULL, fore); + ChangeGC(NullClient, pGC, fmask, fore); ValidateGC(pDraw, pGC); (*pGC->ops->FillPolygon)(pDraw, pGC, Convex, CoordModeOrigin, 4, poly); @@ -3878,7 +3877,7 @@ DrawLogo(WindowPtr pWin) poly[1].x = x + size-( thin+gap); poly[1].y = y; poly[2].x = x + thin; poly[2].y = y + size; poly[3].x = x + thin + gap; poly[3].y = y + size; - dixChangeGC(NullClient, pGC, bmask, NULL, back); + ChangeGC(NullClient, pGC, bmask, back); ValidateGC(pDraw, pGC); (*pGC->ops->FillPolygon)(pDraw, pGC, Convex, CoordModeOrigin, 4, poly); diff --git a/fb/fbseg.c b/fb/fbseg.c index 28a9cf04f..999be1cda 100644 --- a/fb/fbseg.c +++ b/fb/fbseg.c @@ -252,7 +252,7 @@ fbSetFg (DrawablePtr pDrawable, { ChangeGCVal val; val.val = fg; - dixChangeGC (NullClient, pGC, GCForeground, NULL, &val); + ChangeGC (NullClient, pGC, GCForeground, &val); ValidateGC (pDrawable, pGC); } } diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c index e6cb1eeb1..ac8fd47c4 100644 --- a/glx/glxdriswrast.c +++ b/glx/glxdriswrast.c @@ -327,9 +327,9 @@ __glXDRIscreenCreateDrawable(ClientPtr client, private->swapgc = CreateScratchGC(pScreen, pDraw->depth); gcvals[0].val = GXcopy; - dixChangeGC(NullClient, private->gc, GCFunction, NULL, gcvals); + ChangeGC(NullClient, private->gc, GCFunction, gcvals); gcvals[1].val = FALSE; - dixChangeGC(NullClient, private->gc, GCFunction | GCGraphicsExposures, NULL, gcvals); + ChangeGC(NullClient, private->gc, GCFunction | GCGraphicsExposures, gcvals); private->driDrawable = (*driScreen->swrast->createNewDrawable)(driScreen->driScreen, diff --git a/hw/kdrive/ephyr/ephyr_draw.c b/hw/kdrive/ephyr/ephyr_draw.c index f5a324745..b1982a5e6 100644 --- a/hw/kdrive/ephyr/ephyr_draw.c +++ b/hw/kdrive/ephyr/ephyr_draw.c @@ -107,7 +107,7 @@ ephyrPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg) tmpval[0].val = alu; tmpval[1].val = pm; tmpval[2].val = fg; - dixChangeGC(NullClient, fakexa->pGC, GCFunction | GCPlaneMask | GCForeground, NULL, tmpval); + ChangeGC(NullClient, fakexa->pGC, GCFunction | GCPlaneMask | GCForeground, tmpval); ValidateGC(&pPix->drawable, fakexa->pGC); @@ -172,7 +172,7 @@ ephyrPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, int alu, tmpval[0].val = alu; tmpval[1].val = pm; - dixChangeGC (NullClient, fakexa->pGC, GCFunction | GCPlaneMask, NULL, tmpval); + ChangeGC (NullClient, fakexa->pGC, GCFunction | GCPlaneMask, tmpval); ValidateGC(&pDst->drawable, fakexa->pGC); diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c index aedf06833..c81d7daaa 100644 --- a/hw/kdrive/src/kxv.c +++ b/hw/kdrive/src/kxv.c @@ -1892,7 +1892,7 @@ KXVPaintRegion (DrawablePtr pDraw, RegionPtr pRgn, Pixel fg) val[0].val = fg; val[1].val = IncludeInferiors; - dixChangeGC (NullClient, pGC, GCForeground|GCSubwindowMode, NULL, val); + ChangeGC (NullClient, pGC, GCForeground|GCSubwindowMode, val); ValidateGC (pDraw, pGC); diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c index 2ea305bf0..2b33f2585 100644 --- a/hw/xfree86/common/xf86xv.c +++ b/hw/xfree86/common/xf86xv.c @@ -1856,7 +1856,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes) } else if (key != pGC->fgPixel){ ChangeGCVal val; val.val = key; - dixChangeGC(NullClient, pGC, GCForeground, NULL, &val); + ChangeGC(NullClient, pGC, GCForeground, &val); ValidateGC(pDraw, pGC); } @@ -1893,7 +1893,7 @@ xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes) gc = GetScratchGC(root->depth, pScreen); pval[0].val = key; pval[1].val = IncludeInferiors; - (void) dixChangeGC(NullClient, gc, GCForeground|GCSubwindowMode, NULL, pval); + (void) ChangeGC(NullClient, gc, GCForeground|GCSubwindowMode, pval); ValidateGC(root, gc); rects = malloc(nbox * sizeof(xRectangle)); diff --git a/hw/xfree86/xaa/xaaPCache.c b/hw/xfree86/xaa/xaaPCache.c index 7580c26c9..598a1bec8 100644 --- a/hw/xfree86/xaa/xaaPCache.c +++ b/hw/xfree86/xaa/xaaPCache.c @@ -1881,7 +1881,7 @@ XAAWriteBitmapToCacheLinear( pGC = GetScratchGC(pScreenPix->drawable.depth, pScreen); gcvals[0].val = fg; gcvals[1].val = bg; - dixChangeGC(NullClient, pGC, GCForeground | GCBackground, NULL, gcvals); + ChangeGC(NullClient, pGC, GCForeground | GCBackground, gcvals); ValidateGC((DrawablePtr)pDstPix, pGC); /* We've unwrapped already so these ops miss a sync */ diff --git a/include/gc.h b/include/gc.h index 3fa953d56..63eecbd66 100644 --- a/include/gc.h +++ b/include/gc.h @@ -93,11 +93,16 @@ typedef union { pointer ptr; } ChangeGCVal, *ChangeGCValPtr; -extern _X_EXPORT int dixChangeGC( +extern int ChangeGCXIDs( + ClientPtr /*client*/, + GCPtr /*pGC*/, + BITS32 /*mask*/, + CARD32 * /*pval*/); + +extern _X_EXPORT int ChangeGC( ClientPtr /*client*/, GCPtr /*pGC*/, BITS32 /*mask*/, - CARD32 * /*pval*/, ChangeGCValPtr /*pCGCV*/); extern _X_EXPORT GCPtr CreateGC( diff --git a/mi/miarc.c b/mi/miarc.c index bdcbdf140..7e8ec1f50 100644 --- a/mi/miarc.c +++ b/mi/miarc.c @@ -1043,9 +1043,9 @@ miPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) gcvals[3].val = pGC->lineWidth; gcvals[4].val = pGC->capStyle; gcvals[5].val = pGC->joinStyle; - dixChangeGC(NullClient, pGCTo, GCFunction | + ChangeGC(NullClient, pGCTo, GCFunction | GCForeground | GCBackground | GCLineWidth | - GCCapStyle | GCJoinStyle, NULL, gcvals); + GCCapStyle | GCJoinStyle, gcvals); } /* allocate a 1 bit deep pixmap of the appropriate size, and @@ -1088,11 +1088,11 @@ miPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) ChangeGCVal gcval; if (iphase == 1) { gcval.val = bg; - dixChangeGC (NullClient, pGC, GCForeground, NULL, &gcval); + ChangeGC (NullClient, pGC, GCForeground, &gcval); ValidateGC (pDraw, pGC); } else if (pGC->lineStyle == LineDoubleDash) { gcval.val = fg; - dixChangeGC (NullClient, pGC, GCForeground, NULL, &gcval); + ChangeGC (NullClient, pGC, GCForeground, &gcval); ValidateGC (pDraw, pGC); } for (i = 0; i < polyArcs[iphase].narcs; i++) { diff --git a/mi/mibitblt.c b/mi/mibitblt.c index b767a0519..9c6e03d53 100644 --- a/mi/mibitblt.c +++ b/mi/mibitblt.c @@ -426,7 +426,7 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, } /* First set the whole pixmap to 0 */ gcv[0].val = 0; - dixChangeGC(NullClient, pGCT, GCBackground, NULL, gcv); + ChangeGC(NullClient, pGCT, GCBackground, gcv); ValidateGC((DrawablePtr)pPixmap, pGCT); miClearDrawable((DrawablePtr)pPixmap, pGCT); ppt = pptFirst = malloc(h * sizeof(DDXPointRec)); @@ -477,9 +477,9 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, gcv[2].val = dstx - srcx; gcv[3].val = dsty; - dixChangeGC(NullClient, pGC, + ChangeGC(NullClient, pGC, GCFillStyle | GCStipple | GCTileStipXOrigin | GCTileStipYOrigin, - NULL, gcv); + gcv); ValidateGC(pDraw, pGC); /* Fill the drawable with the stipple. This will draw the @@ -495,7 +495,7 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, /* Invert the tiling pixmap. This sets 0s for 1s and 1s for 0s, only * within the clipping region, the part outside is still all 0s */ gcv[0].val = GXinvert; - dixChangeGC(NullClient, pGCT, GCFunction, NULL, gcv); + ChangeGC(NullClient, pGCT, GCFunction, gcv); ValidateGC((DrawablePtr)pPixmap, pGCT); (*pGCT->ops->CopyArea)((DrawablePtr)pPixmap, (DrawablePtr)pPixmap, pGCT, 0, 0, w + srcx, h, 0, 0); @@ -507,8 +507,7 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, gcv[0].val = pGC->bgPixel; gcv[1].val = oldfg; gcv[2].ptr = pPixmap; - dixChangeGC(NullClient, pGC, GCForeground | GCBackground | GCStipple, - NULL, gcv); + ChangeGC(NullClient, pGC, GCForeground | GCBackground | GCStipple, gcv); ValidateGC(pDraw, pGC); /* PolyFillRect might have bashed the rectangle */ rect.x = dstx; @@ -526,9 +525,9 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, gcv[3].ptr = pStipple; gcv[4].val = oldOrg.x; gcv[5].val = oldOrg.y; - dixChangeGC(NullClient, pGC, + ChangeGC(NullClient, pGC, GCForeground | GCBackground | GCFillStyle | GCStipple | - GCTileStipXOrigin | GCTileStipYOrigin, NULL, gcv); + GCTileStipXOrigin | GCTileStipYOrigin, gcv); ValidateGC(pDraw, pGC); /* put what we hope is a smaller clip region back in the scratch gc */ @@ -679,7 +678,7 @@ miGetImage( DrawablePtr pDraw, int sx, int sy, int w, int h, /* alu is already GXCopy */ gcv.val = (XID)planeMask; - dixChangeGC(NullClient, pGC, GCPlaneMask, NULL, &gcv); + ChangeGC(NullClient, pGC, GCPlaneMask, &gcv); ValidateGC((DrawablePtr)pPixmap, pGC); } @@ -776,7 +775,7 @@ miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth, oldBg = pGC->bgPixel; gcv[0].val = (XID)~0; gcv[1].val = (XID)0; - dixChangeGC(NullClient, pGC, GCForeground | GCBackground, NULL, gcv); + ChangeGC(NullClient, pGC, GCForeground | GCBackground, gcv); bytesPer = (long)h * BitmapBytePad(w + leftPad); for (i = 1 << (depth-1); i != 0; i >>= 1, pImage += bytesPer) @@ -784,7 +783,7 @@ miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth, if (i & oldPlanemask) { gcv[0].val = (XID)i; - dixChangeGC(NullClient, pGC, GCPlaneMask, NULL, gcv); + ChangeGC(NullClient, pGC, GCPlaneMask, gcv); ValidateGC(pDraw, pGC); (*pGC->ops->PutImage)(pDraw, pGC, 1, x, y, w, h, leftPad, XYBitmap, (char *)pImage); @@ -793,7 +792,7 @@ miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth, gcv[0].val = (XID)oldPlanemask; gcv[1].val = (XID)oldFg; gcv[2].val = (XID)oldBg; - dixChangeGC(NullClient, pGC, GCPlaneMask | GCForeground | GCBackground, NULL, gcv); + ChangeGC(NullClient, pGC, GCPlaneMask | GCForeground | GCBackground, gcv); ValidateGC(pDraw, pGC); break; diff --git a/mi/midispcur.c b/mi/midispcur.c index 865b60bbc..1acc46933 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -306,7 +306,7 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor) 0, 0, pCursor->bits->width, pCursor->bits->height, 0, XYPixmap, (char *)pCursor->bits->source); gcvals.val = GXand; - dixChangeGC (NullClient, pGC, GCFunction, NULL, &gcvals); + ChangeGC (NullClient, pGC, GCFunction, &gcvals); ValidateGC ((DrawablePtr)pPriv->sourceBits, pGC); (*pGC->ops->PutImage) ((DrawablePtr)pPriv->sourceBits, pGC, 1, 0, 0, pCursor->bits->width, pCursor->bits->height, @@ -314,13 +314,13 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor) /* mask bits -- pCursor->mask & ~pCursor->source */ gcvals.val = GXcopy; - dixChangeGC (NullClient, pGC, GCFunction, NULL, &gcvals); + ChangeGC (NullClient, pGC, GCFunction, &gcvals); ValidateGC ((DrawablePtr)pPriv->maskBits, pGC); (*pGC->ops->PutImage) ((DrawablePtr)pPriv->maskBits, pGC, 1, 0, 0, pCursor->bits->width, pCursor->bits->height, 0, XYPixmap, (char *)pCursor->bits->mask); gcvals.val = GXandInverted; - dixChangeGC (NullClient, pGC, GCFunction, NULL, &gcvals); + ChangeGC (NullClient, pGC, GCFunction, &gcvals); ValidateGC ((DrawablePtr)pPriv->maskBits, pGC); (*pGC->ops->PutImage) ((DrawablePtr)pPriv->maskBits, pGC, 1, 0, 0, pCursor->bits->width, pCursor->bits->height, @@ -371,7 +371,7 @@ miDCPutBits ( if (sourceGC->fgPixel != source) { gcval.val = source; - dixChangeGC (NullClient, sourceGC, GCForeground, NULL, &gcval); + ChangeGC (NullClient, sourceGC, GCForeground, &gcval); } if (sourceGC->serialNumber != pDrawable->serialNumber) ValidateGC (pDrawable, sourceGC); @@ -391,7 +391,7 @@ miDCPutBits ( if (maskGC->fgPixel != mask) { gcval.val = mask; - dixChangeGC (NullClient, maskGC, GCForeground, NULL, &gcval); + ChangeGC (NullClient, maskGC, GCForeground, &gcval); } if (maskGC->serialNumber != pDrawable->serialNumber) ValidateGC (pDrawable, maskGC); diff --git a/mi/miexpose.c b/mi/miexpose.c index 03ce896aa..a99e53008 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -657,7 +657,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) return; } - dixChangeGC (NullClient, pGC, gcmask, NULL, gcval); + ChangeGC (NullClient, pGC, gcmask, gcval); ValidateGC (drawable, pGC); numRects = REGION_NUM_RECTS(prgn); @@ -692,9 +692,9 @@ miClearDrawable(DrawablePtr pDraw, GCPtr pGC) rect.y = 0; rect.width = pDraw->width; rect.height = pDraw->height; - dixChangeGC(NullClient, pGC, GCForeground, NULL, &bg); + ChangeGC(NullClient, pGC, GCForeground, &bg); ValidateGC(pDraw, pGC); (*pGC->ops->PolyFillRect)(pDraw, pGC, 1, &rect); - dixChangeGC(NullClient, pGC, GCForeground, NULL, &fg); + ChangeGC(NullClient, pGC, GCForeground, &fg); ValidateGC(pDraw, pGC); } diff --git a/mi/miglblt.c b/mi/miglblt.c index acb432745..13efb0ced 100644 --- a/mi/miglblt.c +++ b/mi/miglblt.c @@ -138,7 +138,7 @@ miPolyGlyphBlt( gcvals[1].val = 1; gcvals[2].val = 0; - dixChangeGC(NullClient, pGCtmp, GCFunction|GCForeground|GCBackground, NULL, gcvals); + ChangeGC(NullClient, pGCtmp, GCFunction|GCForeground|GCBackground, gcvals); nbyLine = BitmapBytePad(width); pbits = malloc(height*nbyLine); @@ -237,13 +237,13 @@ miImageGlyphBlt( gcvals[0].val = GXcopy; gcvals[1].val = pGC->bgPixel; gcvals[2].val = FillSolid; - dixChangeGC(NullClient, pGC, GCFunction|GCForeground|GCFillStyle, NULL, gcvals); + ChangeGC(NullClient, pGC, GCFunction|GCForeground|GCFillStyle, gcvals); ValidateGC(pDrawable, pGC); (*pGC->ops->PolyFillRect)(pDrawable, pGC, 1, &backrect); /* put down the glyphs */ gcvals[0].val = oldFG; - dixChangeGC(NullClient, pGC, GCForeground, NULL, gcvals); + ChangeGC(NullClient, pGC, GCForeground, gcvals); ValidateGC(pDrawable, pGC); (*pGC->ops->PolyGlyphBlt)(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); @@ -252,7 +252,7 @@ miImageGlyphBlt( gcvals[0].val = oldAlu; gcvals[1].val = oldFG; gcvals[2].val = oldFS; - dixChangeGC(NullClient, pGC, GCFunction|GCForeground|GCFillStyle, NULL, gcvals); + ChangeGC(NullClient, pGC, GCFunction|GCForeground|GCFillStyle, gcvals); ValidateGC(pDrawable, pGC); } diff --git a/mi/mipolypnt.c b/mi/mipolypnt.c index 99ba68afd..3e43a523e 100644 --- a/mi/mipolypnt.c +++ b/mi/mipolypnt.c @@ -107,7 +107,7 @@ miPolyPoint( fsNew.val = FillSolid; if(pGC->fillStyle != FillSolid) { - dixChangeGC(NullClient, pGC, GCFillStyle, NULL, &fsNew); + ChangeGC(NullClient, pGC, GCFillStyle, &fsNew); ValidateGC(pDrawable, pGC); } pwidth = pwidthInit; @@ -117,7 +117,7 @@ miPolyPoint( if(fsOld.val != FillSolid) { - dixChangeGC(NullClient, pGC, GCFillStyle, NULL, &fsOld); + ChangeGC(NullClient, pGC, GCFillStyle, &fsOld); ValidateGC(pDrawable, pGC); } free(pwidthInit); diff --git a/mi/miwideline.c b/mi/miwideline.c index c08f9649f..5f3d58215 100644 --- a/mi/miwideline.c +++ b/mi/miwideline.c @@ -115,7 +115,7 @@ fillSpans(DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, Spans *spans, S if (pixel != oldPixel.val) { tmpPixel.val = (XID)pixel; - dixChangeGC (NullClient, pGC, GCForeground, NULL, &tmpPixel); + ChangeGC (NullClient, pGC, GCForeground, &tmpPixel); ValidateGC (pDrawable, pGC); } (*pGC->ops->FillSpans) (pDrawable, pGC, spans->count, spans->points, spans->widths, TRUE); @@ -123,7 +123,7 @@ fillSpans(DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, Spans *spans, S free(spans->points); if (pixel != oldPixel.val) { - dixChangeGC (NullClient, pGC, GCForeground, NULL, &oldPixel); + ChangeGC (NullClient, pGC, GCForeground, &oldPixel); ValidateGC (pDrawable, pGC); } } @@ -261,13 +261,13 @@ miFillRectPolyHelper ( if (pixel != oldPixel.val) { tmpPixel.val = (XID)pixel; - dixChangeGC (NullClient, pGC, GCForeground, NULL, &tmpPixel); + ChangeGC (NullClient, pGC, GCForeground, &tmpPixel); ValidateGC (pDrawable, pGC); } (*pGC->ops->PolyFillRect) (pDrawable, pGC, 1, &rect); if (pixel != oldPixel.val) { - dixChangeGC (NullClient, pGC, GCForeground, NULL, &oldPixel); + ChangeGC (NullClient, pGC, GCForeground, &oldPixel); ValidateGC (pDrawable, pGC); } } @@ -1504,14 +1504,14 @@ miCleanupSpanData (DrawablePtr pDrawable, GCPtr pGC, SpanDataPtr spanData) oldPixel.val = pGC->fgPixel; if (pixel.val != oldPixel.val) { - dixChangeGC (NullClient, pGC, GCForeground, NULL, &pixel); + ChangeGC (NullClient, pGC, GCForeground, &pixel); ValidateGC (pDrawable, pGC); } miFillUniqueSpanGroup (pDrawable, pGC, &spanData->bgGroup); miFreeSpanGroup (&spanData->bgGroup); if (pixel.val != oldPixel.val) { - dixChangeGC (NullClient, pGC, GCForeground, NULL, &oldPixel); + ChangeGC (NullClient, pGC, GCForeground, &oldPixel); ValidateGC (pDrawable, pGC); } } diff --git a/mi/miwideline.h b/mi/miwideline.h index 8d848783c..e08aa6833 100644 --- a/mi/miwideline.h +++ b/mi/miwideline.h @@ -80,7 +80,7 @@ typedef struct _LineFace { if (pixel != oldPixel) { \ ChangeGCVal gcval; \ gcval.val = pixel; \ - dixChangeGC (NullClient, pGC, GCForeground, NULL, &gcval); \ + ChangeGC (NullClient, pGC, GCForeground, &gcval); \ ValidateGC (pDrawable, pGC); \ } \ } @@ -88,7 +88,7 @@ typedef struct _LineFace { if (pixel != oldPixel) { \ ChangeGCVal gcval; \ gcval.val = oldPixel; \ - dixChangeGC (NullClient, pGC, GCForeground, NULL, &gcval); \ + ChangeGC (NullClient, pGC, GCForeground, &gcval); \ ValidateGC (pDrawable, pGC); \ } \ } diff --git a/mi/mizerarc.c b/mi/mizerarc.c index 623347291..5adf3dd09 100644 --- a/mi/mizerarc.c +++ b/mi/mizerarc.c @@ -805,7 +805,7 @@ miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) { ChangeGCVal gcval; gcval.val = pGC->bgPixel; - dixChangeGC(NullClient, pGC, GCForeground, NULL, &gcval); + ChangeGC(NullClient, pGC, GCForeground, &gcval); ValidateGC(pDraw, pGC); } pts = &points[numPts >> 1]; @@ -835,7 +835,7 @@ miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) { ChangeGCVal gcval; gcval.val = fgPixel; - dixChangeGC(NullClient, pGC, GCForeground, NULL, &gcval); + ChangeGC(NullClient, pGC, GCForeground, &gcval); ValidateGC(pDraw, pGC); } } diff --git a/miext/cw/cw.c b/miext/cw/cw.c index c3bcdc8cb..460862f5f 100644 --- a/miext/cw/cw.c +++ b/miext/cw/cw.c @@ -204,8 +204,8 @@ cwValidateGC(GCPtr pGC, unsigned long stateChanges, DrawablePtr pDrawable) vals[0].val = x_off - pDrawable->x; vals[1].val = y_off - pDrawable->y; - dixChangeGC(NullClient, pBackingGC, - (GCClipXOrigin | GCClipYOrigin), NULL, vals); + ChangeGC(NullClient, pBackingGC, + (GCClipXOrigin | GCClipYOrigin), vals); pPriv->serialNumber = pDrawable->serialNumber; /* @@ -226,8 +226,8 @@ cwValidateGC(GCPtr pGC, unsigned long stateChanges, DrawablePtr pDrawable) ChangeGCVal vals[2]; vals[0].val = pGC->patOrg.x + x_off; vals[1].val = pGC->patOrg.y + y_off; - dixChangeGC(NullClient, pBackingGC, - (GCTileStipXOrigin | GCTileStipYOrigin), NULL, vals); + ChangeGC(NullClient, pBackingGC, + (GCTileStipXOrigin | GCTileStipYOrigin), vals); } ValidateGC(pBackingDrawable, pBackingGC); diff --git a/render/mirect.c b/render/mirect.c index 38452ec39..13d7fa602 100644 --- a/render/mirect.c +++ b/render/mirect.c @@ -70,7 +70,7 @@ miColorRects (PicturePtr pDst, (*pGC->funcs->ChangeClip) (pGC, CT_REGION, pClip, 0); } - dixChangeGC (NullClient, pGC, mask, NULL, tmpval); + ChangeGC (NullClient, pGC, mask, tmpval); ValidateGC (pDst->pDrawable, pGC); if (xoff || yoff) { @@ -149,7 +149,7 @@ miCompositeRects (CARD8 op, gcvals[0].val = GXcopy; gcvals[1].val = pixel; - dixChangeGC (NullClient, pGC, GCFunction | GCForeground, NULL, gcvals); + ChangeGC (NullClient, pGC, GCFunction | GCForeground, gcvals); ValidateGC (&pPixmap->drawable, pGC); one.x = 0; one.y = 0; diff --git a/xfixes/region.c b/xfixes/region.c index 8ed7fa15d..d5f583f1b 100644 --- a/xfixes/region.c +++ b/xfixes/region.c @@ -642,7 +642,7 @@ ProcXFixesSetGCClipRegion (ClientPtr client) vals[0].val = stuff->xOrigin; vals[1].val = stuff->yOrigin; - dixChangeGC (NullClient, pGC, GCClipXOrigin|GCClipYOrigin, NULL, vals); + ChangeGC (NullClient, pGC, GCClipXOrigin|GCClipYOrigin, vals); (*pGC->funcs->ChangeClip)(pGC, pRegion ? CT_REGION : CT_NONE, (pointer)pRegion, 0); return (client->noClientException); |