dix: Rename (and retype) PixmapPerDepth[1] to defaultStipple
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
8b335d9068
commit
e900a00f8d
13
dix/gc.c
13
dix/gc.c
|
@ -504,7 +504,7 @@ NewGCObject(ScreenPtr pScreen, int depth)
|
|||
pGC->font = defaultFont;
|
||||
if (pGC->font) /* necessary, because open of default font could fail */
|
||||
pGC->font->refcnt++;
|
||||
pGC->stipple = pGC->pScreen->PixmapPerDepth[0];
|
||||
pGC->stipple = pGC->pScreen->defaultStipple;
|
||||
if (pGC->stipple)
|
||||
pGC->stipple->refcnt++;
|
||||
|
||||
|
@ -874,8 +874,7 @@ CreateDefaultStipple(int screenNum)
|
|||
w = 16;
|
||||
h = 16;
|
||||
(*pScreen->QueryBestSize) (StippleShape, &w, &h, pScreen);
|
||||
if (!(pScreen->PixmapPerDepth[0] =
|
||||
(*pScreen->CreatePixmap) (pScreen, w, h, 1, 0)))
|
||||
if (!(pScreen->defaultStipple = pScreen->CreatePixmap(pScreen, w, h, 1, 0)))
|
||||
return FALSE;
|
||||
/* fill stipple with 1 */
|
||||
tmpval[0].val = GXcopy;
|
||||
|
@ -883,17 +882,17 @@ CreateDefaultStipple(int screenNum)
|
|||
tmpval[2].val = FillSolid;
|
||||
pgcScratch = GetScratchGC(1, pScreen);
|
||||
if (!pgcScratch) {
|
||||
(*pScreen->DestroyPixmap) (pScreen->PixmapPerDepth[0]);
|
||||
(*pScreen->DestroyPixmap) (pScreen->defaultStipple);
|
||||
return FALSE;
|
||||
}
|
||||
(void) ChangeGC(NullClient, pgcScratch,
|
||||
GCFunction | GCForeground | GCFillStyle, tmpval);
|
||||
ValidateGC((DrawablePtr) pScreen->PixmapPerDepth[0], pgcScratch);
|
||||
ValidateGC((DrawablePtr) pScreen->defaultStipple, pgcScratch);
|
||||
rect.x = 0;
|
||||
rect.y = 0;
|
||||
rect.width = w;
|
||||
rect.height = h;
|
||||
(*pgcScratch->ops->PolyFillRect) ((DrawablePtr) pScreen->PixmapPerDepth[0],
|
||||
(*pgcScratch->ops->PolyFillRect) ((DrawablePtr) pScreen->defaultStipple,
|
||||
pgcScratch, 1, &rect);
|
||||
FreeScratchGC(pgcScratch);
|
||||
return TRUE;
|
||||
|
@ -904,7 +903,7 @@ FreeDefaultStipple(int screenNum)
|
|||
{
|
||||
ScreenPtr pScreen = screenInfo.screens[screenNum];
|
||||
|
||||
(*pScreen->DestroyPixmap) (pScreen->PixmapPerDepth[0]);
|
||||
(*pScreen->DestroyPixmap) (pScreen->defaultStipple);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -922,7 +922,7 @@ dmxBECreateResources(void *value, XID id, RESTYPE type, void *n)
|
|||
dmxBECreatePixmap(pGC->tile.pixmap);
|
||||
dmxBERestorePixmap(pGC->tile.pixmap);
|
||||
}
|
||||
if (pGC->stipple != pScreen->PixmapPerDepth[0]) {
|
||||
if (pGC->stipple != pScreen->defaultStipple) {
|
||||
dmxBECreatePixmap(pGC->stipple);
|
||||
dmxBERestorePixmap(pGC->stipple);
|
||||
}
|
||||
|
@ -1327,8 +1327,8 @@ dmxAttachScreen(int idx, DMXScreenAttributesPtr attr)
|
|||
* updated to handle dynamic addition/removal of screens. */
|
||||
|
||||
/* Create default stipple */
|
||||
dmxBECreatePixmap(pScreen->PixmapPerDepth[0]);
|
||||
dmxBERestorePixmap(pScreen->PixmapPerDepth[0]);
|
||||
dmxBECreatePixmap(pScreen->defaultStipple);
|
||||
dmxBERestorePixmap(pScreen->defaultStipple);
|
||||
|
||||
/* Create the scratch GCs */
|
||||
dmxBECreateScratchGCs(idx);
|
||||
|
@ -1692,8 +1692,8 @@ dmxDetachScreen(int idx)
|
|||
dmxBEDestroyWindowTree(idx);
|
||||
|
||||
/* Free default stipple */
|
||||
dmxBESavePixmap(screenInfo.screens[idx]->PixmapPerDepth[0]);
|
||||
dmxBEFreePixmap(screenInfo.screens[idx]->PixmapPerDepth[0]);
|
||||
dmxBESavePixmap(screenInfo.screens[idx]->defaultStipple);
|
||||
dmxBEFreePixmap(screenInfo.screens[idx]->defaultStipple);
|
||||
|
||||
/* Free the remaining screen resources and close the screen */
|
||||
dmxBECloseScreen(screenInfo.screens[idx]);
|
||||
|
|
|
@ -248,7 +248,7 @@ xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[])
|
|||
pScreen->whitePixel = xnestWhitePixel;
|
||||
pScreen->blackPixel = xnestBlackPixel;
|
||||
/* GCperDepth */
|
||||
/* PixmapPerDepth */
|
||||
/* defaultStipple */
|
||||
pScreen->devPrivate = NULL;
|
||||
/* WindowPrivateLen */
|
||||
/* WindowPrivateSizes */
|
||||
|
|
|
@ -504,14 +504,12 @@ typedef struct _Screen {
|
|||
char backingStoreSupport, saveUnderSupport;
|
||||
unsigned long whitePixel, blackPixel;
|
||||
GCPtr GCperDepth[MAXFORMATS + 1];
|
||||
/* next field is a stipple to use as default in
|
||||
a GC. we don't build default tiles of all depths
|
||||
because they are likely to be of a color
|
||||
different from the default fg pixel, so
|
||||
we don't win anything by building
|
||||
a standard one.
|
||||
/* next field is a stipple to use as default in a GC. we don't build
|
||||
* default tiles of all depths because they are likely to be of a color
|
||||
* different from the default fg pixel, so we don't win anything by
|
||||
* building a standard one.
|
||||
*/
|
||||
PixmapPtr PixmapPerDepth[1];
|
||||
PixmapPtr defaultStipple;
|
||||
void *devPrivate;
|
||||
short numVisuals;
|
||||
VisualPtr visuals;
|
||||
|
|
Loading…
Reference in New Issue