mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-26 21:12:25 +00:00
dixChangeGC callers: Use ChangeGCVal instead of XID almost everywhere.
The exceptions are ProcChangeGC and CreateGC. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
95728ca09d
commit
e2929db7b7
22 changed files with 181 additions and 164 deletions
|
|
@ -222,7 +222,7 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor)
|
|||
{
|
||||
miDCCursorPtr pPriv;
|
||||
GCPtr pGC;
|
||||
XID gcvals[3];
|
||||
ChangeGCVal gcvals;
|
||||
|
||||
pPriv = malloc(sizeof (miDCCursorRec));
|
||||
if (!pPriv)
|
||||
|
|
@ -305,22 +305,22 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor)
|
|||
(*pGC->ops->PutImage) ((DrawablePtr)pPriv->sourceBits, pGC, 1,
|
||||
0, 0, pCursor->bits->width, pCursor->bits->height,
|
||||
0, XYPixmap, (char *)pCursor->bits->source);
|
||||
gcvals[0] = GXand;
|
||||
dixChangeGC (NullClient, pGC, GCFunction, gcvals, NULL);
|
||||
gcvals.val = GXand;
|
||||
dixChangeGC (NullClient, pGC, GCFunction, NULL, &gcvals);
|
||||
ValidateGC ((DrawablePtr)pPriv->sourceBits, pGC);
|
||||
(*pGC->ops->PutImage) ((DrawablePtr)pPriv->sourceBits, pGC, 1,
|
||||
0, 0, pCursor->bits->width, pCursor->bits->height,
|
||||
0, XYPixmap, (char *)pCursor->bits->mask);
|
||||
|
||||
/* mask bits -- pCursor->mask & ~pCursor->source */
|
||||
gcvals[0] = GXcopy;
|
||||
dixChangeGC (NullClient, pGC, GCFunction, gcvals, NULL);
|
||||
gcvals.val = GXcopy;
|
||||
dixChangeGC (NullClient, pGC, GCFunction, NULL, &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);
|
||||
gcvals.val = GXandInverted;
|
||||
dixChangeGC (NullClient, pGC, GCFunction, NULL, &gcvals);
|
||||
ValidateGC ((DrawablePtr)pPriv->maskBits, pGC);
|
||||
(*pGC->ops->PutImage) ((DrawablePtr)pPriv->maskBits, pGC, 1,
|
||||
0, 0, pCursor->bits->width, pCursor->bits->height,
|
||||
|
|
@ -365,13 +365,13 @@ miDCPutBits (
|
|||
unsigned long source,
|
||||
unsigned long mask)
|
||||
{
|
||||
XID gcvals[1];
|
||||
ChangeGCVal gcval;
|
||||
int x, y;
|
||||
|
||||
if (sourceGC->fgPixel != source)
|
||||
{
|
||||
gcvals[0] = source;
|
||||
dixChangeGC (NullClient, sourceGC, GCForeground, gcvals, NULL);
|
||||
gcval.val = source;
|
||||
dixChangeGC (NullClient, sourceGC, GCForeground, NULL, &gcval);
|
||||
}
|
||||
if (sourceGC->serialNumber != pDrawable->serialNumber)
|
||||
ValidateGC (pDrawable, sourceGC);
|
||||
|
|
@ -390,8 +390,8 @@ miDCPutBits (
|
|||
(*sourceGC->ops->PushPixels) (sourceGC, pPriv->sourceBits, pDrawable, w, h, x, y);
|
||||
if (maskGC->fgPixel != mask)
|
||||
{
|
||||
gcvals[0] = mask;
|
||||
dixChangeGC (NullClient, maskGC, GCForeground, gcvals, NULL);
|
||||
gcval.val = mask;
|
||||
dixChangeGC (NullClient, maskGC, GCForeground, NULL, &gcval);
|
||||
}
|
||||
if (maskGC->serialNumber != pDrawable->serialNumber)
|
||||
ValidateGC (pDrawable, maskGC);
|
||||
|
|
|
|||
Loading…
Reference in a new issue