diff options
Diffstat (limited to 'hw/xfree86/xf8_32bpp')
-rw-r--r-- | hw/xfree86/xf8_32bpp/cfb8_32.h | 16 | ||||
-rw-r--r-- | hw/xfree86/xf8_32bpp/cfbpntwin.c | 129 | ||||
-rw-r--r-- | hw/xfree86/xf8_32bpp/cfbscrinit.c | 8 | ||||
-rw-r--r-- | hw/xfree86/xf8_32bpp/cfbwindow.c | 5 | ||||
-rw-r--r-- | hw/xfree86/xf8_32bpp/xf86overlay.c | 65 |
5 files changed, 1 insertions, 222 deletions
diff --git a/hw/xfree86/xf8_32bpp/cfb8_32.h b/hw/xfree86/xf8_32bpp/cfb8_32.h index 281e5f2e0..6e985da20 100644 --- a/hw/xfree86/xf8_32bpp/cfb8_32.h +++ b/hw/xfree86/xf8_32bpp/cfb8_32.h @@ -109,13 +109,6 @@ cfb8_32GetImage ( char *pdstLine ); -void -cfb8_32PaintWindow ( - WindowPtr pWin, - RegionPtr pRegion, - int what -); - Bool cfb8_32ScreenInit ( ScreenPtr pScreen, @@ -133,15 +126,6 @@ cfb8_32FillBoxSolid8 ( unsigned long color ); - -void -cfb8_32FillBoxSolid32 ( - DrawablePtr pDraw, - int nbox, - BoxPtr pBox, - unsigned long color -); - RegionPtr cfb8_32CopyPlane( DrawablePtr pSrc, diff --git a/hw/xfree86/xf8_32bpp/cfbpntwin.c b/hw/xfree86/xf8_32bpp/cfbpntwin.c index a1b988716..fbf597d22 100644 --- a/hw/xfree86/xf8_32bpp/cfbpntwin.c +++ b/hw/xfree86/xf8_32bpp/cfbpntwin.c @@ -23,97 +23,6 @@ #endif void -cfb8_32PaintWindow( - WindowPtr pWin, - RegionPtr pRegion, - int what -){ - WindowPtr pBgWin; - int xorg, yorg; - - switch (what) { - case PW_BACKGROUND: - switch (pWin->backgroundState) { - case None: - break; - case ParentRelative: - do { - pWin = pWin->parent; - } while (pWin->backgroundState == ParentRelative); - (*pWin->drawable.pScreen->PaintWindowBackground)( - pWin, pRegion, what); - break; - case BackgroundPixmap: - xorg = pWin->drawable.x; - yorg = pWin->drawable.y; -#ifdef PANORAMIX - if(!noPanoramiXExtension) { - int index = pWin->drawable.pScreen->myNum; - if(WindowTable[index] == pWin) { - xorg -= panoramiXdataPtr[index].x; - yorg -= panoramiXdataPtr[index].y; - } - } -#endif - cfb32FillBoxTileOddGeneral ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), REGION_RECTS(pRegion), - pWin->background.pixmap, xorg, yorg, GXcopy, - (pWin->drawable.depth == 24) ? 0x00ffffff : 0xff000000); - break; - case BackgroundPixel: - if(pWin->drawable.depth == 24) - cfb8_32FillBoxSolid32 ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->background.pixel); - else - cfb8_32FillBoxSolid8 ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->background.pixel); - break; - } - break; - case PW_BORDER: - if (pWin->borderIsPixel) { - if(pWin->drawable.depth == 24) { - cfb8_32FillBoxSolid32 ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->border.pixel); - } else - cfb8_32FillBoxSolid8 ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), - pWin->border.pixel); - } else { - for (pBgWin = pWin; - pBgWin->backgroundState == ParentRelative; - pBgWin = pBgWin->parent); - - xorg = pBgWin->drawable.x; - yorg = pBgWin->drawable.y; - -#ifdef PANORAMIX - if(!noPanoramiXExtension) { - int index = pWin->drawable.pScreen->myNum; - if(WindowTable[index] == pBgWin) { - xorg -= panoramiXdataPtr[index].x; - yorg -= panoramiXdataPtr[index].y; - } - } -#endif - cfb32FillBoxTileOddGeneral ((DrawablePtr)pWin, - (int)REGION_NUM_RECTS(pRegion), REGION_RECTS(pRegion), - pWin->border.pixmap, xorg, yorg, GXcopy, - (pWin->drawable.depth == 24) ? 0x00ffffff : 0xff000000); - } - break; - } - -} - -void cfb8_32FillBoxSolid8( DrawablePtr pDraw, int nbox, @@ -140,41 +49,3 @@ cfb8_32FillBoxSolid8( pbox++; } } - - -void -cfb8_32FillBoxSolid32( - DrawablePtr pDraw, - int nbox, - BoxPtr pbox, - unsigned long color -){ - CARD8 *ptr, *data; - CARD16 *ptr2, *data2; - int pitch, pitch2; - int height, width, i; - CARD8 c = (CARD8)(color >> 16); - CARD16 c2 = (CARD16)color; - - cfbGetByteWidthAndPointer(pDraw, pitch, ptr); - cfbGetTypedWidthAndPointer(pDraw, pitch2, ptr2, CARD16, CARD16); - ptr += 2; /* point to the third byte */ - - while(nbox--) { - data = ptr + (pbox->y1 * pitch) + (pbox->x1 << 2); - data2 = ptr2 + (pbox->y1 * pitch2) + (pbox->x1 << 1); - width = (pbox->x2 - pbox->x1) << 1; - height = pbox->y2 - pbox->y1; - - while(height--) { - for(i = 0; i < width; i+=2) { - data[i << 1] = c; - data2[i] = c2; - } - data += pitch; - data2 += pitch2; - } - pbox++; - } -} - diff --git a/hw/xfree86/xf8_32bpp/cfbscrinit.c b/hw/xfree86/xf8_32bpp/cfbscrinit.c index fffd8d392..c3432b803 100644 --- a/hw/xfree86/xf8_32bpp/cfbscrinit.c +++ b/hw/xfree86/xf8_32bpp/cfbscrinit.c @@ -55,11 +55,7 @@ cfb8_32AllocatePrivates(ScreenPtr pScreen) /* All cfb will have the same GC and Window private indicies */ - if(!mfbAllocatePrivates(pScreen, &cfbWindowPrivateKey, &cfbGCPrivateKey)) - return FALSE; - - /* The cfb indicies are the mfb indicies. Reallocating them resizes them */ - if(!dixRequestPrivate(cfbWindowPrivateKey, sizeof(cfbPrivWin))) + if(!mfbAllocatePrivates(pScreen, &cfbGCPrivateKey)) return FALSE; if(!dixRequestPrivate(cfbGCPrivateKey, sizeof(cfbPrivGC))) @@ -108,8 +104,6 @@ cfb8_32SetupScreen( pScreen->ChangeWindowAttributes = cfb8_32ChangeWindowAttributes; pScreen->RealizeWindow = cfb32MapWindow; /* OK */ pScreen->UnrealizeWindow = cfb32UnmapWindow; /* OK */ - pScreen->PaintWindowBackground = cfb8_32PaintWindow; - pScreen->PaintWindowBorder = cfb8_32PaintWindow; pScreen->CopyWindow = cfb8_32CopyWindow; pScreen->CreatePixmap = cfb32CreatePixmap; /* OK */ pScreen->DestroyPixmap = cfb32DestroyPixmap; /* OK */ diff --git a/hw/xfree86/xf8_32bpp/cfbwindow.c b/hw/xfree86/xf8_32bpp/cfbwindow.c index ce741cb55..787cbdec6 100644 --- a/hw/xfree86/xf8_32bpp/cfbwindow.c +++ b/hw/xfree86/xf8_32bpp/cfbwindow.c @@ -27,11 +27,6 @@ Bool cfb8_32CreateWindow(WindowPtr pWin) { - cfbPrivWin *pPrivWin = cfbGetWindowPrivate(pWin); - - pPrivWin->fastBackground = FALSE; - pPrivWin->fastBorder = FALSE; - pWin->drawable.bitsPerPixel = 32; return TRUE; } diff --git a/hw/xfree86/xf8_32bpp/xf86overlay.c b/hw/xfree86/xf8_32bpp/xf86overlay.c index bab014b8c..700c71ada 100644 --- a/hw/xfree86/xf8_32bpp/xf86overlay.c +++ b/hw/xfree86/xf8_32bpp/xf86overlay.c @@ -34,7 +34,6 @@ static Bool OverlayCreateGC(GCPtr pGC); static Bool OverlayDestroyPixmap(PixmapPtr); static PixmapPtr OverlayCreatePixmap(ScreenPtr, int, int, int); static Bool OverlayChangeWindowAttributes(WindowPtr, unsigned long); -static void OverlayPaintWindow(WindowPtr, RegionPtr, int); /** Funcs **/ static void OverlayValidateGC(GCPtr, unsigned long, DrawablePtr); @@ -159,8 +158,6 @@ typedef struct { CreatePixmapProcPtr CreatePixmap; DestroyPixmapProcPtr DestroyPixmap; ChangeWindowAttributesProcPtr ChangeWindowAttributes; - PaintWindowBackgroundProcPtr PaintWindowBackground; - PaintWindowBorderProcPtr PaintWindowBorder; int LockPrivate; } OverlayScreenRec, *OverlayScreenPtr; @@ -273,16 +270,12 @@ xf86Overlay8Plus32Init (ScreenPtr pScreen) pScreenPriv->CreatePixmap = pScreen->CreatePixmap; pScreenPriv->DestroyPixmap = pScreen->DestroyPixmap; pScreenPriv->ChangeWindowAttributes = pScreen->ChangeWindowAttributes; - pScreenPriv->PaintWindowBackground = pScreen->PaintWindowBackground; - pScreenPriv->PaintWindowBorder = pScreen->PaintWindowBorder; pScreen->CreateGC = OverlayCreateGC; pScreen->CloseScreen = OverlayCloseScreen; pScreen->CreatePixmap = OverlayCreatePixmap; pScreen->DestroyPixmap = OverlayDestroyPixmap; pScreen->ChangeWindowAttributes = OverlayChangeWindowAttributes; - pScreen->PaintWindowBackground = OverlayPaintWindow; - pScreen->PaintWindowBorder = OverlayPaintWindow; pScreenPriv->LockPrivate = 0; @@ -391,8 +384,6 @@ OverlayCloseScreen (int i, ScreenPtr pScreen) pScreen->CreatePixmap = pScreenPriv->CreatePixmap; pScreen->DestroyPixmap = pScreenPriv->DestroyPixmap; pScreen->ChangeWindowAttributes = pScreenPriv->ChangeWindowAttributes; - pScreen->PaintWindowBackground = pScreenPriv->PaintWindowBackground; - pScreen->PaintWindowBorder = pScreenPriv->PaintWindowBorder; xfree ((pointer) pScreenPriv); @@ -424,62 +415,6 @@ OverlayChangeWindowAttributes (WindowPtr pWin, unsigned long mask) return result; } -static void -OverlayPaintWindow( - WindowPtr pWin, - RegionPtr pReg, - int what -){ - ScreenPtr pScreen = pWin->drawable.pScreen; - OverlayScreenPtr pScreenPriv = OVERLAY_GET_SCREEN_PRIVATE(pScreen); - OverlayPixmapPtr pixPriv; - PixmapPtr oldPix = NULL; - - if(what == PW_BACKGROUND) { - if(pWin->drawable.depth == 8) { - if(pWin->backgroundState == ParentRelative) { - do { - pWin = pWin->parent; - } while (pWin->backgroundState == ParentRelative); - } - - if(pWin->backgroundState == BackgroundPixmap) { - oldPix = pWin->background.pixmap; - pixPriv = OVERLAY_GET_PIXMAP_PRIVATE(oldPix); - /* have to do this here because alot of applications - incorrectly assume changes to a pixmap that is - a window background go into effect immediatedly */ - if(pixPriv->dirty & IS_DIRTY) - OverlayRefreshPixmap(pWin->background.pixmap); - pWin->background.pixmap = pixPriv->pix32; - } - } - - pScreen->PaintWindowBackground = pScreenPriv->PaintWindowBackground; - (*pScreen->PaintWindowBackground) (pWin, pReg, what); - pScreen->PaintWindowBackground = OverlayPaintWindow; - - if(oldPix) - pWin->background.pixmap = oldPix; - } else { - if((pWin->drawable.depth == 8) && !pWin->borderIsPixel) { - oldPix = pWin->border.pixmap; - pixPriv = OVERLAY_GET_PIXMAP_PRIVATE(oldPix); - if(pixPriv->dirty & IS_DIRTY) - OverlayRefreshPixmap(pWin->border.pixmap); - pWin->border.pixmap = pixPriv->pix32; - } - - pScreen->PaintWindowBorder = pScreenPriv->PaintWindowBorder; - (*pScreen->PaintWindowBorder) (pWin, pReg, what); - pScreen->PaintWindowBorder = OverlayPaintWindow; - - if(oldPix) - pWin->border.pixmap = oldPix; - } -} - - /*********************** GC Funcs *****************************/ |