summaryrefslogtreecommitdiff
path: root/dix/gc.c
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-05-08 19:08:47 -0700
committerJamey Sharp <jamey@minilop.net>2010-05-13 17:14:07 -0700
commit5193f25ea33eed31d6a75cdc1a86427c23d8033c (patch)
tree12c39ff89c63d1eb0e1eb512d9b03f4703cd879c /dix/gc.c
parent6a84cd943430cfc9df55c83aef6a7f8dea6dbb94 (diff)
Define GCAllBits as the union of all valid CreateGC masks.
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'dix/gc.c')
-rw-r--r--dix/gc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dix/gc.c b/dix/gc.c
index 1f2d4d05b..43d16db4d 100644
--- a/dix/gc.c
+++ b/dix/gc.c
@@ -424,7 +424,7 @@ ChangeGCXIDs(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32)
{
ChangeGCVal vals[GCLastBit + 1];
int i;
- if (mask & ~((1 << (GCLastBit + 1)) - 1))
+ if (mask & ~GCAllBits)
{
clientErrorValue = mask;
return BadValue;
@@ -534,7 +534,7 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus,
if (*pStatus != Success)
goto out;
- pGC->stateChanges = (1 << (GCLastBit+1)) - 1;
+ pGC->stateChanges = GCAllBits;
if (!(*pGC->pScreen->CreateGC)(pGC))
*pStatus = BadAlloc;
else if (mask)
@@ -837,7 +837,7 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth)
pGC->lastWinOrg.x = 0;
pGC->lastWinOrg.y = 0;
- pGC->stateChanges = (1 << (GCLastBit+1)) - 1;
+ pGC->stateChanges = GCAllBits;
if (!(*pScreen->CreateGC)(pGC))
{
FreeGC(pGC, (XID)0);
@@ -1118,7 +1118,7 @@ GetScratchGC(unsigned depth, ScreenPtr pScreen)
pGC->clipOrg.y = 0;
if (pGC->clientClipType != CT_NONE)
(*pGC->funcs->ChangeClip) (pGC, CT_NONE, NULL, 0);
- pGC->stateChanges = (1 << (GCLastBit+1)) - 1;
+ pGC->stateChanges = GCAllBits;
return pGC;
}
/* if we make it this far, need to roll our own */