static Bool afbCreateScreenResources(ScreenPtr pScreen) { Bool retval; pointer oldDevPrivate = pScreen->devPrivate; pScreen->devPrivate = pScreen->devPrivates[afbScreenPrivateIndex].ptr; retval = miCreateScreenResources(pScreen); /* Modify screen's pixmap devKind value stored off devPrivate to * be the width of a single plane in longs rather than the width * of a chunky screen in longs as incorrectly setup by the mi routine. */ ((PixmapPtr)pScreen->devPrivate)->devKind = BitmapBytePad(pScreen->width); pScreen->devPrivates[afbScreenPrivateIndex].ptr = pScreen->devPrivate; pScreen->devPrivate = oldDevPrivate; return(retval); }
static Bool cfb24_32CreateScreenResources(ScreenPtr pScreen) { miScreenInitParmsPtr pScrInitParms; int pitch; Bool retval; /* get the pitch before mi destroys it */ pScrInitParms = (miScreenInitParmsPtr)pScreen->devPrivate; pitch = BitmapBytePad(pScrInitParms->width * 24); if((retval = miCreateScreenResources(pScreen))) { /* fix the screen pixmap */ PixmapPtr pPix = (PixmapPtr)pScreen->devPrivate; pPix->drawable.bitsPerPixel = 24; pPix->devKind = pitch; } return retval; }