[PATCH 13/14] Replace dixChangeGC with calls directly to the right variant.

Keith Packard keithp at keithp.com
Sat May 8 19:29:10 PDT 2010


On Sat,  8 May 2010 16:39:28 -0700, Jamey Sharp <jamey at minilop.net> wrote:

> @@ -500,7 +500,7 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h)
>  	    XID val = IncludeInferiors;
>  	    
>  	    ValidateGC(&pPixmap->drawable, pGC);
> -	    dixChangeGC (serverClient, pGC, GCSubwindowMode, &val, NULL);
> +	    ChangeGCXIDs (serverClient, pGC, GCSubwindowMode, &val);
>  	    (*pGC->ops->CopyArea) (&pParent->drawable,
>  				   &pPixmap->drawable,
>  				   pGC,

Should be ChangeGC

> diff --git a/dix/dixfonts.c b/dix/dixfonts.c
> index d28bc50..6209bd5 100644
> --- a/dix/dixfonts.c
> +++ b/dix/dixfonts.c
> @@ -1261,7 +1261,7 @@ doPolyText(ClientPtr client, PTclosurePtr c)
>  	    {
>  		if (pFont != c->pGC->font && c->pDraw)
>  		{
> -		    dixChangeGC(NullClient, c->pGC, GCFont, &fid, NULL);
> +		    ChangeGCXIDs(NullClient, c->pGC, GCFont, &fid);
>  		    ValidateGC(c->pDraw, c->pGC);
>  		    if (c->reqType == X_PolyText8)
>  			c->polyText = (PolyTextPtr) c->pGC->ops->PolyText8;

Should be ChangeGC and you should just pass the pFont in.

> @@ -1404,7 +1404,7 @@ bail:
>  	/* Step 4 */
>  	if (pFont != origGC->font)
>  	{
> -	    dixChangeGC(NullClient, origGC, GCFont, &fid, NULL);
> +	    ChangeGCXIDs(NullClient, origGC, GCFont, &fid);
>  	    ValidateGC(c->pDraw, origGC);
>  	}
>  

Should be ChangeGC and you should just pass the pFont in.

> @@ -1423,7 +1423,7 @@ bail:
>      if (c->slept)
>      {
>  	ClientWakeup(c->client);
> -	dixChangeGC(NullClient, c->pGC, clearGCmask, clearGC, NULL);
> +	ChangeGCXIDs(NullClient, c->pGC, clearGCmask, clearGC);
>  
>  	/* Unreference the font from the scratch GC */
>  	CloseFont(c->pGC->font, (Font)0);
> @@ -1580,7 +1580,7 @@ bail:
>      if (c->slept)
>      {
>  	ClientWakeup(c->client);
> -	dixChangeGC(NullClient, c->pGC, clearGCmask, clearGC, NULL);
> +	ChangeGCXIDs(NullClient, c->pGC, clearGCmask, clearGC);
>  
>  	/* Unreference the font from the scratch GC */
>  	CloseFont(c->pGC->font, (Font)0);

Should be ChangeGC.


> @@ -600,7 +581,7 @@ CreateDefaultTile (GCPtr pGC)
>      tmpval[0] = GXcopy;
>      tmpval[1] = pGC->tile.pixel;
>      tmpval[2] = FillSolid;
> -    (void)dixChangeGC(NullClient, pgcScratch, GCFunction | GCForeground | GCFillStyle, tmpval, NULL);
> +    (void)ChangeGCXIDs(NullClient, pgcScratch, GCFunction | GCForeground | GCFillStyle, tmpval);
>      ValidateGC((DrawablePtr)pTile, pgcScratch);
>      rect.x = 0;
>      rect.y = 0;

Should be ChangeGC

> @@ -939,7 +920,7 @@ CreateDefaultStipple(int screenNum)
>  	(*pScreen->DestroyPixmap)(pScreen->PixmapPerDepth[0]);
>  	return FALSE;
>      }
> -    (void)dixChangeGC(NullClient, pgcScratch, GCFunction|GCForeground|GCFillStyle, tmpval, NULL);
> +    (void)ChangeGCXIDs(NullClient, pgcScratch, GCFunction|GCForeground|GCFillStyle, tmpval);
>      ValidateGC((DrawablePtr)pScreen->PixmapPerDepth[0], pgcScratch);
>      rect.x = 0;
>      rect.y = 0;

Should be ChangeGC


> index 84c514b..67cfecc 100644
> --- a/dix/window.c
> +++ b/dix/window.c
> @@ -328,7 +328,7 @@ MakeRootTile(WindowPtr pWin)
>  	attributes[0] = pScreen->whitePixel;
>  	attributes[1] = pScreen->blackPixel;
>  
> -	(void)dixChangeGC(NullClient, pGC, GCForeground | GCBackground, attributes, NULL);
> +	(void)ChangeGCXIDs(NullClient, pGC, GCForeground | GCBackground, attributes);
>      }
>  
>     ValidateGC((DrawablePtr)pWin->background.pixmap, pGC);

Should be ChangeGC


> diff --git a/fb/fbseg.c b/fb/fbseg.c
> index 80dd480..64ecd08 100644
> --- a/fb/fbseg.c
> +++ b/fb/fbseg.c
> @@ -250,7 +250,7 @@ fbSetFg (DrawablePtr	pDrawable,
>  {
>      if (fg != pGC->fgPixel)
>      {
> -	dixChangeGC (NullClient, pGC, GCForeground, &fg, NULL);
> +	ChangeGCXIDs (NullClient, pGC, GCForeground, &fg);
>  	ValidateGC (pDrawable, pGC);
>      }
>  }

Should be ChangeGC

> diff --git a/glx/glxdriswrast.c b/glx/glxdriswrast.c
> index 918383c..5a562e3 100644
> --- a/glx/glxdriswrast.c
> +++ b/glx/glxdriswrast.c
> @@ -297,7 +297,7 @@ glxChangeGC(GCPtr gc, BITS32 mask, CARD32 val)
>  {
>      CARD32 v[1];
>      v[0] = val;
> -    dixChangeGC(NullClient, gc, mask, v, NULL);
> +    ChangeGCXIDs(NullClient, gc, mask, v);
>  }
>  
>  static __GLXdrawable *

This function is only used three times and should be replaced with
ChangeGC calls.

> diff --git a/hw/kdrive/ephyr/ephyr_draw.c b/hw/kdrive/ephyr/ephyr_draw.c
> index ffc96e6..130c877 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] = alu;
>      tmpval[1] = pm;
>      tmpval[2] = fg;
> -    dixChangeGC(NullClient, fakexa->pGC, GCFunction | GCPlaneMask | GCForeground, tmpval, NULL);
> +    ChangeGCXIDs(NullClient, fakexa->pGC, GCFunction | GCPlaneMask | GCForeground, tmpval);
>  
>      ValidateGC(&pPix->drawable, fakexa->pGC);
>  

Should be ChangeGC

> @@ -172,7 +172,7 @@ ephyrPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, int alu,
>  
>      tmpval[0] = alu;
>      tmpval[1] = pm;
> -    dixChangeGC (NullClient, fakexa->pGC, GCFunction | GCPlaneMask, tmpval, NULL);
> +    ChangeGCXIDs (NullClient, fakexa->pGC, GCFunction | GCPlaneMask, tmpval);
>  
>      ValidateGC(&pDst->drawable, fakexa->pGC);
>  

Should be ChangeGC

> diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c
> index 4506c54..bcee666 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] = fg;
>      val[1] = IncludeInferiors;
> -    dixChangeGC (NullClient, pGC, GCForeground|GCSubwindowMode, val, NULL);
> +    ChangeGCXIDs (NullClient, pGC, GCForeground|GCSubwindowMode, val);
>  
>      ValidateGC (pDraw, pGC);
>  

Should be ChangeGC

> diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
> index 6387184..c6a9192 100644
> --- a/hw/xfree86/common/xf86xv.c
> +++ b/hw/xfree86/common/xf86xv.c
> @@ -1855,7 +1855,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes)
>         if (pPriv) pPriv->pGC = pGC;
>     } else if (key != pGC->fgPixel){
>         pval[0] = key;
> -       dixChangeGC(NullClient, pGC, GCForeground, pval, NULL);
> +       ChangeGCXIDs(NullClient, pGC, GCForeground, pval);
>         ValidateGC(pDraw, pGC);
>     }
>  

Should be ChangeGC

> @@ -1892,7 +1892,7 @@ xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes)
>     gc = GetScratchGC(root->depth, pScreen);
>     pval[0] = key;
>     pval[1] = IncludeInferiors;
> -   (void) dixChangeGC(NullClient, gc, GCForeground|GCSubwindowMode, pval, NULL);
> +   (void) ChangeGCXIDs(NullClient, gc, GCForeground|GCSubwindowMode, pval);
>     ValidateGC(root, gc);
>  
>     rects = xalloc (nbox * sizeof(xRectangle));

Should be ChangeGC

> diff --git a/hw/xfree86/xaa/xaaPCache.c b/hw/xfree86/xaa/xaaPCache.c
> index ef3ecd2..dc84bf6 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] = fg;
>     gcvals[1] = bg;
> -   dixChangeGC(NullClient, pGC, GCForeground | GCBackground, gcvals, NULL);
> +   ChangeGCXIDs(NullClient, pGC, GCForeground | GCBackground, gcvals);
>     ValidateGC((DrawablePtr)pDstPix, pGC);
>  
>     /* We've unwrapped already so these ops miss a sync */

Should be ChangeGC

> diff --git a/include/gc.h b/include/gc.h
> index 3fa953d..e6b347b 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 _X_EXPORT 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 0b61264..ee98afb 100644
> --- a/mi/miarc.c
> +++ b/mi/miarc.c
> @@ -1137,9 +1137,9 @@ miPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs)
>  		gcvals[3] = pGC->lineWidth;
>  		gcvals[4] = pGC->capStyle;
>  		gcvals[5] = pGC->joinStyle;
> -		dixChangeGC(NullClient, pGCTo, GCFunction |
> +		ChangeGCXIDs(NullClient, pGCTo, GCFunction |
>  			GCForeground | GCBackground | GCLineWidth |
> -			GCCapStyle | GCJoinStyle, gcvals, NULL);
> +			GCCapStyle | GCJoinStyle, gcvals);
>  	    }
>      
>  	    /* allocate a 1 bit deep pixmap of the appropriate size, and

Should be ChangeGC


> @@ -1180,10 +1180,10 @@ miPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs)
>  	     iphase--)
>  	{
>  	    if (iphase == 1) {
> -		dixChangeGC (NullClient, pGC, GCForeground, &bg, NULL);
> +		ChangeGCXIDs (NullClient, pGC, GCForeground, &bg);
>  		ValidateGC (pDraw, pGC);
>  	    } else if (pGC->lineStyle == LineDoubleDash) {
> -		dixChangeGC (NullClient, pGC, GCForeground, &fg, NULL);
> +		ChangeGCXIDs (NullClient, pGC, GCForeground, &fg);
>  		ValidateGC (pDraw, pGC);
>  	    }
>  	    for (i = 0; i < polyArcs[iphase].narcs; i++) {

Should be ChangeGC

> diff --git a/mi/mibitblt.c b/mi/mibitblt.c
> index 246ff4b..215a631 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 = xalloc(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[0] = (XID)planeMask;
> -	    dixChangeGC(NullClient, pGC, GCPlaneMask, gcv, NULL);
> +	    ChangeGCXIDs(NullClient, pGC, GCPlaneMask, gcv);
>  	    ValidateGC((DrawablePtr)pPixmap, pGC);
>  	}
>  

Should be ChangeGC

> @@ -776,7 +775,7 @@ miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth,
>  	oldBg = pGC->bgPixel;
>  	gcv[0] = (XID)~0;
>  	gcv[1] = (XID)0;
> -	dixChangeGC(NullClient, pGC, GCForeground | GCBackground, gcv, NULL);
> +	ChangeGCXIDs(NullClient, pGC, GCForeground | GCBackground, gcv);
>  	bytesPer = (long)h * BitmapBytePad(w + leftPad);
>  
>  	for (i = 1 << (depth-1); i != 0; i >>= 1, pImage += bytesPer)

Should be ChangeGC

> @@ -784,7 +783,7 @@ miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth,
>  	    if (i & oldPlanemask)
>  	    {
>  	        gcv[0] = (XID)i;
> -	        dixChangeGC(NullClient, pGC, GCPlaneMask, gcv, NULL);
> +	        ChangeGCXIDs(NullClient, pGC, GCPlaneMask, gcv);
>  	        ValidateGC(pDraw, pGC);
>  	        (*pGC->ops->PutImage)(pDraw, pGC, 1, x, y, w, h, leftPad,
>  			         XYBitmap, (char *)pImage);

Should be ChangeGC

> @@ -793,7 +792,7 @@ miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth,
>  	gcv[0] = (XID)oldPlanemask;
>  	gcv[1] = (XID)oldFg;
>  	gcv[2] = (XID)oldBg;
> -	dixChangeGC(NullClient, pGC, GCPlaneMask | GCForeground | GCBackground, gcv, NULL);
> +	ChangeGCXIDs(NullClient, pGC, GCPlaneMask | GCForeground | GCBackground, gcv);
>  	ValidateGC(pDraw, pGC);
>  	break;
>  

Should be ChangeGC

> diff --git a/mi/midispcur.c b/mi/midispcur.c
> index 73f39c2..3efbbf5 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[0] = GXand;
> -    dixChangeGC (NullClient, pGC, GCFunction, gcvals, NULL);
> +    ChangeGCXIDs (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,

Should be ChangeGC

> @@ -314,13 +314,13 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor)
>  
>      /* mask bits -- pCursor->mask & ~pCursor->source */
>      gcvals[0] = GXcopy;
> -    dixChangeGC (NullClient, pGC, GCFunction, gcvals, NULL);
> +    ChangeGCXIDs (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[0] = GXandInverted;
> -    dixChangeGC (NullClient, pGC, GCFunction, gcvals, NULL);
> +    ChangeGCXIDs (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,

Should be ChangeGC

> @@ -371,7 +371,7 @@ miDCPutBits (
>      if (sourceGC->fgPixel != source)
>      {
>  	gcvals[0] = source;
> -	dixChangeGC (NullClient, sourceGC, GCForeground, gcvals, NULL);
> +	ChangeGCXIDs (NullClient, sourceGC, GCForeground, gcvals);
>      }
>      if (sourceGC->serialNumber != pDrawable->serialNumber)
>  	ValidateGC (pDrawable, sourceGC);

Should be ChangeGC

> @@ -391,7 +391,7 @@ miDCPutBits (
>      if (maskGC->fgPixel != mask)
>      {
>  	gcvals[0] = mask;
> -	dixChangeGC (NullClient, maskGC, GCForeground, gcvals, NULL);
> +	ChangeGCXIDs (NullClient, maskGC, GCForeground, gcvals);
>      }
>      if (maskGC->serialNumber != pDrawable->serialNumber)
>  	ValidateGC (pDrawable, maskGC);

Should be ChangeGC

> diff --git a/mi/miexpose.c b/mi/miexpose.c
> index 4943685..ef445c1 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);
> @@ -691,9 +691,9 @@ miClearDrawable(DrawablePtr pDraw, GCPtr pGC)
>      rect.y = 0;
>      rect.width = pDraw->width;
>      rect.height = pDraw->height;
> -    dixChangeGC(NullClient, pGC, GCForeground, &bg, NULL);
> +    ChangeGCXIDs(NullClient, pGC, GCForeground, &bg);
>      ValidateGC(pDraw, pGC);
>      (*pGC->ops->PolyFillRect)(pDraw, pGC, 1, &rect);
> -    dixChangeGC(NullClient, pGC, GCForeground, &fg, NULL);
> +    ChangeGCXIDs(NullClient, pGC, GCForeground, &fg);
>      ValidateGC(pDraw, pGC);
>  }

Should be ChangeGC

> diff --git a/mi/miglblt.c b/mi/miglblt.c
> index 7e1e40d..6aac8c0 100644
> --- a/mi/miglblt.c
> +++ b/mi/miglblt.c
> @@ -138,7 +138,7 @@ miPolyGlyphBlt(
>      gcvals[1] = 1;
>      gcvals[2] = 0;
>  
> -    dixChangeGC(NullClient, pGCtmp, GCFunction|GCForeground|GCBackground, gcvals, NULL);
> +    ChangeGCXIDs(NullClient, pGCtmp, GCFunction|GCForeground|GCBackground, gcvals);
>  
>      nbyLine = BitmapBytePad(width);
>      pbits = xalloc(height*nbyLine);

Should be ChangeGC

> @@ -237,13 +237,13 @@ miImageGlyphBlt(
>      gcvals[0] = GXcopy;
>      gcvals[1] = pGC->bgPixel;
>      gcvals[2] = FillSolid;
> -    dixChangeGC(NullClient, pGC, GCFunction|GCForeground|GCFillStyle, gcvals, NULL);
> +    ChangeGCXIDs(NullClient, pGC, GCFunction|GCForeground|GCFillStyle, gcvals);
>      ValidateGC(pDrawable, pGC);
>      (*pGC->ops->PolyFillRect)(pDrawable, pGC, 1, &backrect);
>  
>      /* put down the glyphs */
>      gcvals[0] = oldFG;
> -    dixChangeGC(NullClient, pGC, GCForeground, gcvals, NULL);
> +    ChangeGCXIDs(NullClient, pGC, GCForeground, gcvals);
>      ValidateGC(pDrawable, pGC);
>      (*pGC->ops->PolyGlyphBlt)(pDrawable, pGC, x, y, nglyph, ppci,
>  			      pglyphBase);

Should be ChangeGC

> @@ -252,7 +252,7 @@ miImageGlyphBlt(
>      gcvals[0] = oldAlu;
>      gcvals[1] = oldFG;
>      gcvals[2] = oldFS;
> -    dixChangeGC(NullClient, pGC, GCFunction|GCForeground|GCFillStyle, gcvals, NULL);
> +    ChangeGCXIDs(NullClient, pGC, GCFunction|GCForeground|GCFillStyle, gcvals);
>      ValidateGC(pDrawable, pGC);
>  
>  }

Should be ChangeGC

> diff --git a/mi/mipolypnt.c b/mi/mipolypnt.c
> index 351de5f..1ac2a3b 100644
> --- a/mi/mipolypnt.c
> +++ b/mi/mipolypnt.c
> @@ -107,7 +107,7 @@ miPolyPoint(
>      fsNew = FillSolid;
>      if(pGC->fillStyle != FillSolid)
>      {
> -	dixChangeGC(NullClient, pGC, GCFillStyle, &fsNew, NULL);
> +	ChangeGCXIDs(NullClient, pGC, GCFillStyle, &fsNew);
>  	ValidateGC(pDrawable, pGC);
>      }
>      pwidth = pwidthInit;

Should be ChangeGC

> @@ -117,7 +117,7 @@ miPolyPoint(
>  
>      if(fsOld != FillSolid)
>      {
> -	dixChangeGC(NullClient, pGC, GCFillStyle, &fsOld, NULL);
> +	ChangeGCXIDs(NullClient, pGC, GCFillStyle, &fsOld);
>  	ValidateGC(pDrawable, pGC);
>      }
>      xfree(pwidthInit);

Should be ChangeGC

> diff --git a/mi/miwideline.c b/mi/miwideline.c
> index 069594c..0e291a4 100644
> --- a/mi/miwideline.c
> +++ b/mi/miwideline.c
> @@ -114,7 +114,7 @@ fillSpans(DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, Spans *spans, S
>  	if (pixel != oldPixel)
>  	{
>  	    XID tmpPixel = (XID)pixel;
> -	    dixChangeGC (NullClient, pGC, GCForeground, &tmpPixel, NULL);
> +	    ChangeGCXIDs (NullClient, pGC, GCForeground, &tmpPixel);
>  	    ValidateGC (pDrawable, pGC);
>  	}
>  	(*pGC->ops->FillSpans) (pDrawable, pGC, spans->count, spans->points, spans->widths, TRUE);

Should be ChangeGC

> @@ -122,7 +122,7 @@ fillSpans(DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, Spans *spans, S
>  	xfree (spans->points);
>  	if (pixel != oldPixel)
>  	{
> -	    dixChangeGC (NullClient, pGC, GCForeground, &oldPixel, NULL);
> +	    ChangeGCXIDs (NullClient, pGC, GCForeground, &oldPixel);
>  	    ValidateGC (pDrawable, pGC);
>  	}
>      }

Should be ChangeGC

> @@ -260,13 +260,13 @@ miFillRectPolyHelper (
>      	if (pixel != oldPixel)
>      	{
>  	    XID tmpPixel = (XID)pixel;
> -	    dixChangeGC (NullClient, pGC, GCForeground, &tmpPixel, NULL);
> +	    ChangeGCXIDs (NullClient, pGC, GCForeground, &tmpPixel);
>      	    ValidateGC (pDrawable, pGC);
>      	}
>  	(*pGC->ops->PolyFillRect) (pDrawable, pGC, 1, &rect);
>      	if (pixel != oldPixel)
>      	{
> -	    dixChangeGC (NullClient, pGC, GCForeground, &oldPixel, NULL);
> +	    ChangeGCXIDs (NullClient, pGC, GCForeground, &oldPixel);
>  	    ValidateGC (pDrawable, pGC);
>      	}
>      }

Should be ChangeGC

> @@ -1504,14 +1504,14 @@ miCleanupSpanData (DrawablePtr pDrawable, GCPtr pGC, SpanDataPtr spanData)
>  	oldPixel = pGC->fgPixel;
>      	if (pixel != oldPixel)
>      	{
> -	    dixChangeGC (NullClient, pGC, GCForeground, &pixel, NULL);
> +	    ChangeGCXIDs (NullClient, pGC, GCForeground, &pixel);
>      	    ValidateGC (pDrawable, pGC);
>      	}
>  	miFillUniqueSpanGroup (pDrawable, pGC, &spanData->bgGroup);
>  	miFreeSpanGroup (&spanData->bgGroup);
>      	if (pixel != oldPixel)
>      	{
> -	    dixChangeGC (NullClient, pGC, GCForeground, &oldPixel, NULL);
> +	    ChangeGCXIDs (NullClient, pGC, GCForeground, &oldPixel);
>  	    ValidateGC (pDrawable, pGC);
>      	}
>      }

Should be ChangeGC

> diff --git a/mi/miwideline.h b/mi/miwideline.h
> index 2ff36ed..11a8e3a 100644
> --- a/mi/miwideline.h
> +++ b/mi/miwideline.h
> @@ -78,13 +78,13 @@ typedef struct _LineFace {
>  #define MILINESETPIXEL(pDrawable, pGC, pixel, oldPixel) { \
>      oldPixel = pGC->fgPixel; \
>      if (pixel != oldPixel) { \
> -	dixChangeGC (NullClient, pGC, GCForeground, (XID *) &pixel, NULL); \
> +	ChangeGCXIDs (NullClient, pGC, GCForeground, (XID *) &pixel); \
>  	ValidateGC (pDrawable, pGC); \
>      } \
>  }
>  #define MILINERESETPIXEL(pDrawable, pGC, pixel, oldPixel) { \
>      if (pixel != oldPixel) { \
> -	dixChangeGC (NullClient, pGC, GCForeground, (XID *) &oldPixel, NULL); \
> +	ChangeGCXIDs (NullClient, pGC, GCForeground, (XID *) &oldPixel); \
>  	ValidateGC (pDrawable, pGC); \
>      } \
>  }

Should be ChangeGC

> diff --git a/mi/mizerarc.c b/mi/mizerarc.c
> index 46d1e5c..348f07e 100644
> --- a/mi/mizerarc.c
> +++ b/mi/mizerarc.c
> @@ -803,7 +803,7 @@ miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs)
>  	    if ((pGC->fillStyle == FillSolid) ||
>  		(pGC->fillStyle == FillStippled))
>  	    {
> -		dixChangeGC(NullClient, pGC, GCForeground, (XID *)&pGC->bgPixel, NULL);
> +		ChangeGCXIDs(NullClient, pGC, GCForeground, (XID *)&pGC->bgPixel);
>  		ValidateGC(pDraw, pGC);
>  	    }
>  	    pts = &points[numPts >> 1];

Should be ChangeGC

> @@ -831,7 +831,7 @@ miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs)
>  	    if ((pGC->fillStyle == FillSolid) ||
>  		(pGC->fillStyle == FillStippled))
>  	    {
> -		dixChangeGC(NullClient, pGC, GCForeground, &fgPixel, NULL);
> +		ChangeGCXIDs(NullClient, pGC, GCForeground, &fgPixel);
>  		ValidateGC(pDraw, pGC);
>  	    }
>  	}

Should be ChangeGC

> diff --git a/miext/cw/cw.c b/miext/cw/cw.c
> index 247cb83..59b8ebd 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] = x_off - pDrawable->x;
>  	vals[1] = y_off - pDrawable->y;
> -	dixChangeGC(NullClient, pBackingGC,
> -		    (GCClipXOrigin | GCClipYOrigin), vals, NULL);
> +	ChangeGCXIDs(NullClient, pBackingGC,
> +		    (GCClipXOrigin | GCClipYOrigin), vals);
>  
>  	pPriv->serialNumber = pDrawable->serialNumber;
>  	/*

Should be ChangeGC

> @@ -226,8 +226,8 @@ cwValidateGC(GCPtr pGC, unsigned long stateChanges, DrawablePtr pDrawable)
>  	XID vals[2];
>  	vals[0] = pGC->patOrg.x + x_off;
>  	vals[1] = pGC->patOrg.y + y_off;
> -	dixChangeGC(NullClient, pBackingGC,
> -		    (GCTileStipXOrigin | GCTileStipYOrigin), vals, NULL);
> +	ChangeGCXIDs(NullClient, pBackingGC,
> +		    (GCTileStipXOrigin | GCTileStipYOrigin), vals);
>      }
>  
>      ValidateGC(pBackingDrawable, pBackingGC);

Should be ChangeGC

> diff --git a/render/mirect.c b/render/mirect.c
> index 0030eff..70dc9c3 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, tmpval, NULL);
> +    ChangeGCXIDs (NullClient, pGC, mask, tmpval);
>      ValidateGC (pDst->pDrawable, pGC);
>      if (xoff || yoff)
>      {
> @@ -148,7 +148,7 @@ miCompositeRects (CARD8		op,
>  	tmpval[0] = GXcopy;
>  	tmpval[1] = pixel;
>  
> -	dixChangeGC (NullClient, pGC, GCFunction | GCForeground, tmpval, NULL);
> +	ChangeGCXIDs (NullClient, pGC, GCFunction | GCForeground, tmpval);
>  	ValidateGC (&pPixmap->drawable, pGC);
>  	one.x = 0;
>  	one.y = 0;

Should be ChangeGC

> diff --git a/xfixes/region.c b/xfixes/region.c
> index 6ccc723..1cf36ea 100644
> --- a/xfixes/region.c
> +++ b/xfixes/region.c
> @@ -643,7 +643,7 @@ ProcXFixesSetGCClipRegion (ClientPtr client)
>      
>      vals[0] = stuff->xOrigin;
>      vals[1] = stuff->yOrigin;
> -    dixChangeGC (NullClient, pGC, GCClipXOrigin|GCClipYOrigin, vals, NULL);
> +    ChangeGCXIDs (NullClient, pGC, GCClipXOrigin|GCClipYOrigin, vals);
>      (*pGC->funcs->ChangeClip)(pGC, pRegion ? CT_REGION : CT_NONE, (pointer)pRegion, 0);
>  
>      return (client->noClientException);

Should be ChangeGC

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100508/417f3306/attachment-0001.pgp>


More information about the xorg-devel mailing list