summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-05-07 19:38:05 -0700
committerJamey Sharp <jamey@minilop.net>2010-05-13 17:14:07 -0700
commit6a84cd943430cfc9df55c83aef6a7f8dea6dbb94 (patch)
treeb6b75bd36bc05c394e3b1e52edaccde1d52a136d /mi
parent2d7eb4a19b773d0406c0c2e018a7da97f3565fd5 (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>
Diffstat (limited to 'mi')
-rw-r--r--mi/miarc.c8
-rw-r--r--mi/mibitblt.c23
-rw-r--r--mi/midispcur.c10
-rw-r--r--mi/miexpose.c6
-rw-r--r--mi/miglblt.c8
-rw-r--r--mi/mipolypnt.c4
-rw-r--r--mi/miwideline.c12
-rw-r--r--mi/miwideline.h4
-rw-r--r--mi/mizerarc.c4
9 files changed, 39 insertions, 40 deletions
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);
}
}