summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2016-12-09 14:52:29 -0500
committerAdam Jackson <ajax@redhat.com>2016-12-12 14:09:59 -0500
commit98caba9f5669291e84f8610cc3071a9ac2df205f (patch)
tree3153ec1313d6fb218f415cb384ecea3f2dcfceb1 /dix
parente900a00f8dc5a1db63bafddd4ad1cde744975db1 (diff)
dix: Clear graphicsExposures for scratch GCs in one place
... instead of in all the CreateScratchGC callers. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'dix')
-rw-r--r--dix/gc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/dix/gc.c b/dix/gc.c
index 960e86829..cb8db8535 100644
--- a/dix/gc.c
+++ b/dix/gc.c
@@ -811,6 +811,7 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth)
FreeGC(pGC, (XID) 0);
pGC = (GCPtr) NULL;
}
+ pGC->graphicsExposures = FALSE;
return pGC;
}
@@ -843,7 +844,6 @@ CreateGCperDepth(int screenNum)
/* do depth 1 separately because it's not included in list */
if (!(ppGC[0] = CreateScratchGC(pScreen, 1)))
return FALSE;
- ppGC[0]->graphicsExposures = FALSE;
/* Make sure we don't overflow GCperDepth[] */
if (pScreen->numDepths > MAXFORMATS)
return FALSE;
@@ -855,7 +855,6 @@ CreateGCperDepth(int screenNum)
(void) FreeGC(ppGC[i], (XID) 0);
return FALSE;
}
- ppGC[i + 1]->graphicsExposures = FALSE;
}
return TRUE;
}
@@ -1072,10 +1071,7 @@ GetScratchGC(unsigned depth, ScreenPtr pScreen)
}
}
/* if we make it this far, need to roll our own */
- pGC = CreateScratchGC(pScreen, depth);
- if (pGC)
- pGC->graphicsExposures = FALSE;
- return pGC;
+ return CreateScratchGC(pScreen, depth);
}
/*