summaryrefslogtreecommitdiff
path: root/hw/xfree86
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86')
-rw-r--r--hw/xfree86/rac/xf86RAC.c40
-rw-r--r--hw/xfree86/shadowfb/shadow.c42
-rw-r--r--hw/xfree86/xaa/Makefile.am2
-rw-r--r--hw/xfree86/xaa/xaa.h2
-rw-r--r--hw/xfree86/xaa/xaaInit.c10
-rw-r--r--hw/xfree86/xaa/xaaOverlay.c179
-rw-r--r--hw/xfree86/xaa/xaaOverlayDF.c53
-rw-r--r--hw/xfree86/xaa/xaaPaintWin.c200
-rw-r--r--hw/xfree86/xaa/xaaStateChange.c24
-rw-r--r--hw/xfree86/xaa/xaaWrapper.c35
-rw-r--r--hw/xfree86/xaa/xaalocal.h10
-rw-r--r--hw/xfree86/xf1bpp/Makefile.am1
-rw-r--r--hw/xfree86/xf1bpp/mfbmap.h1
-rw-r--r--hw/xfree86/xf1bpp/mfbunmap.h1
-rw-r--r--hw/xfree86/xf4bpp/Makefile.am1
-rw-r--r--hw/xfree86/xf4bpp/ppcGC.c9
-rw-r--r--hw/xfree86/xf4bpp/ppcIO.c4
-rw-r--r--hw/xfree86/xf4bpp/ppcPntWin.c216
-rw-r--r--hw/xfree86/xf4bpp/ppcWindow.c8
-rw-r--r--hw/xfree86/xf4bpp/xf4bpp.h7
-rw-r--r--hw/xfree86/xf8_32bpp/cfb8_32.h16
-rw-r--r--hw/xfree86/xf8_32bpp/cfbpntwin.c129
-rw-r--r--hw/xfree86/xf8_32bpp/cfbscrinit.c8
-rw-r--r--hw/xfree86/xf8_32bpp/cfbwindow.c5
-rw-r--r--hw/xfree86/xf8_32bpp/xf86overlay.c65
25 files changed, 4 insertions, 1064 deletions
diff --git a/hw/xfree86/rac/xf86RAC.c b/hw/xfree86/rac/xf86RAC.c
index 8492cdb69..9d2812c49 100644
--- a/hw/xfree86/rac/xf86RAC.c
+++ b/hw/xfree86/rac/xf86RAC.c
@@ -98,8 +98,6 @@ typedef struct _RACScreen {
GetImageProcPtr GetImage;
GetSpansProcPtr GetSpans;
SourceValidateProcPtr SourceValidate;
- PaintWindowBackgroundProcPtr PaintWindowBackground;
- PaintWindowBorderProcPtr PaintWindowBorder;
CopyWindowProcPtr CopyWindow;
ClearToBackgroundProcPtr ClearToBackground;
CreatePixmapProcPtr CreatePixmap;
@@ -139,8 +137,6 @@ static void RACGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt,
int *pwidth, int nspans, char *pdstStart);
static void RACSourceValidate (DrawablePtr pDrawable,
int x, int y, int width, int height );
-static void RACPaintWindowBackground(WindowPtr pWin, RegionPtr prgn, int what);
-static void RACPaintWindowBorder(WindowPtr pWin, RegionPtr prgn, int what);
static void RACCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg,
RegionPtr prgnSrc );
static void RACClearToBackground (WindowPtr pWin, int x, int y,
@@ -296,8 +292,6 @@ xf86RACInit(ScreenPtr pScreen, unsigned int flag)
WRAP_SCREEN_COND(GetImage, RACGetImage, RAC_FB);
WRAP_SCREEN_COND(GetSpans, RACGetSpans, RAC_FB);
WRAP_SCREEN_COND(SourceValidate, RACSourceValidate, RAC_FB);
- WRAP_SCREEN_COND(PaintWindowBackground, RACPaintWindowBackground, RAC_FB);
- WRAP_SCREEN_COND(PaintWindowBorder, RACPaintWindowBorder, RAC_FB);
WRAP_SCREEN_COND(CopyWindow, RACCopyWindow, RAC_FB);
WRAP_SCREEN_COND(ClearToBackground, RACClearToBackground, RAC_FB);
WRAP_SCREEN_COND(CreatePixmap, RACCreatePixmap, RAC_FB);
@@ -341,8 +335,6 @@ RACCloseScreen (int i, ScreenPtr pScreen)
UNWRAP_SCREEN(GetImage);
UNWRAP_SCREEN(GetSpans);
UNWRAP_SCREEN(SourceValidate);
- UNWRAP_SCREEN(PaintWindowBackground);
- UNWRAP_SCREEN(PaintWindowBorder);
UNWRAP_SCREEN(CopyWindow);
UNWRAP_SCREEN(ClearToBackground);
UNWRAP_SCREEN(SaveScreen);
@@ -427,38 +419,6 @@ RACSourceValidate (
}
static void
-RACPaintWindowBackground(
- WindowPtr pWin,
- RegionPtr prgn,
- int what
- )
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
-
- DPRINT_S("RACPaintWindowBackground",pScreen->myNum);
- SCREEN_PROLOG (PaintWindowBackground);
- ENABLE;
- (*pScreen->PaintWindowBackground) (pWin, prgn, what);
- SCREEN_EPILOG (PaintWindowBackground, RACPaintWindowBackground);
-}
-
-static void
-RACPaintWindowBorder(
- WindowPtr pWin,
- RegionPtr prgn,
- int what
-)
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
-
- DPRINT_S("RACPaintWindowBorder",pScreen->myNum);
- SCREEN_PROLOG (PaintWindowBorder);
- ENABLE;
- (*pScreen->PaintWindowBorder) (pWin, prgn, what);
- SCREEN_EPILOG (PaintWindowBorder, RACPaintWindowBorder);
-}
-
-static void
RACCopyWindow(
WindowPtr pWin,
DDXPointRec ptOldOrg,
diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c
index c1b6ed1ce..3511a635e 100644
--- a/hw/xfree86/shadowfb/shadow.c
+++ b/hw/xfree86/shadowfb/shadow.c
@@ -35,11 +35,6 @@
#define MAX(a,b) (((a)>(b))?(a):(b))
static Bool ShadowCloseScreen (int i, ScreenPtr pScreen);
-static void ShadowPaintWindow (
- WindowPtr pWin,
- RegionPtr prgn,
- int what
-);
static void ShadowCopyWindow(
WindowPtr pWin,
DDXPointRec ptOldOrg,
@@ -82,8 +77,6 @@ typedef struct {
RefreshAreaFuncPtr preRefresh;
RefreshAreaFuncPtr postRefresh;
CloseScreenProcPtr CloseScreen;
- PaintWindowBackgroundProcPtr PaintWindowBackground;
- PaintWindowBorderProcPtr PaintWindowBorder;
CopyWindowProcPtr CopyWindow;
CreateGCProcPtr CreateGC;
ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
@@ -200,8 +193,6 @@ ShadowFBInit2 (
pPriv->vtSema = TRUE;
pPriv->CloseScreen = pScreen->CloseScreen;
- pPriv->PaintWindowBackground = pScreen->PaintWindowBackground;
- pPriv->PaintWindowBorder = pScreen->PaintWindowBorder;
pPriv->CopyWindow = pScreen->CopyWindow;
pPriv->CreateGC = pScreen->CreateGC;
pPriv->ModifyPixmapHeader = pScreen->ModifyPixmapHeader;
@@ -210,8 +201,6 @@ ShadowFBInit2 (
pPriv->LeaveVT = pScrn->LeaveVT;
pScreen->CloseScreen = ShadowCloseScreen;
- pScreen->PaintWindowBackground = ShadowPaintWindow;
- pScreen->PaintWindowBorder = ShadowPaintWindow;
pScreen->CopyWindow = ShadowCopyWindow;
pScreen->CreateGC = ShadowCreateGC;
pScreen->ModifyPixmapHeader = ShadowModifyPixmapHeader;
@@ -276,8 +265,6 @@ ShadowCloseScreen (int i, ScreenPtr pScreen)
#endif /* RENDER */
pScreen->CloseScreen = pPriv->CloseScreen;
- pScreen->PaintWindowBackground = pPriv->PaintWindowBackground;
- pScreen->PaintWindowBorder = pPriv->PaintWindowBorder;
pScreen->CopyWindow = pPriv->CopyWindow;
pScreen->CreateGC = pPriv->CreateGC;
pScreen->ModifyPixmapHeader = pPriv->ModifyPixmapHeader;
@@ -296,35 +283,6 @@ ShadowCloseScreen (int i, ScreenPtr pScreen)
return (*pScreen->CloseScreen) (i, pScreen);
}
-static void
-ShadowPaintWindow(
- WindowPtr pWin,
- RegionPtr prgn,
- int what
-){
- ScreenPtr pScreen = pWin->drawable.pScreen;
- ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(pScreen);
- int num = 0;
-
- if(pPriv->vtSema && (num = REGION_NUM_RECTS(prgn)))
- if(pPriv->preRefresh)
- (*pPriv->preRefresh)(pPriv->pScrn, num, REGION_RECTS(prgn));
-
- if(what == PW_BACKGROUND) {
- pScreen->PaintWindowBackground = pPriv->PaintWindowBackground;
- (*pScreen->PaintWindowBackground) (pWin, prgn, what);
- pScreen->PaintWindowBackground = ShadowPaintWindow;
- } else {
- pScreen->PaintWindowBorder = pPriv->PaintWindowBorder;
- (*pScreen->PaintWindowBorder) (pWin, prgn, what);
- pScreen->PaintWindowBorder = ShadowPaintWindow;
- }
-
- if(num && pPriv->postRefresh)
- (*pPriv->postRefresh)(pPriv->pScrn, num, REGION_RECTS(prgn));
-}
-
-
static void
ShadowCopyWindow(
WindowPtr pWin,
diff --git a/hw/xfree86/xaa/Makefile.am b/hw/xfree86/xaa/Makefile.am
index 6ed8303a4..58c8e885f 100644
--- a/hw/xfree86/xaa/Makefile.am
+++ b/hw/xfree86/xaa/Makefile.am
@@ -16,7 +16,7 @@ libxaa_la_SOURCES = xaaInit.c xaaGC.c xaaInitAccel.c xaaFallback.c \
xaaBitBlt.c xaaCpyArea.c xaaGCmisc.c xaaCpyWin.c \
xaaCpyPlane.c xaaFillRect.c xaaTEText.c xaaNonTEText.c \
xaaPCache.c xaaSpans.c xaaROP.c xaaImage.c xaaWrapper.c \
- xaaPaintWin.c xaaRect.c xaaLineMisc.c xaaBitOrder.c \
+ xaaRect.c xaaLineMisc.c xaaBitOrder.c \
xaaFillPoly.c xaaWideLine.c xaaTables.c xaaFillArc.c \
xaaLine.c xaaDashLine.c xaaOverlay.c xaaOffscreen.c \
xaaOverlayDF.c xaaStateChange.c xaaPict.c $(POLYSEG) \
diff --git a/hw/xfree86/xaa/xaa.h b/hw/xfree86/xaa/xaa.h
index c8d0467e9..1dc7ed2d5 100644
--- a/hw/xfree86/xaa/xaa.h
+++ b/hw/xfree86/xaa/xaa.h
@@ -1238,8 +1238,6 @@ typedef struct _XAAInfoRec {
GetImageProcPtr GetImage;
GetSpansProcPtr GetSpans;
- PaintWindowBackgroundProcPtr PaintWindowBackground;
- PaintWindowBorderProcPtr PaintWindowBorder;
CopyWindowProcPtr CopyWindow;
BackingStoreSaveAreasProcPtr SaveAreas;
BackingStoreRestoreAreasProcPtr RestoreAreas;
diff --git a/hw/xfree86/xaa/xaaInit.c b/hw/xfree86/xaa/xaaInit.c
index 93f6995aa..422242513 100644
--- a/hw/xfree86/xaa/xaaInit.c
+++ b/hw/xfree86/xaa/xaaInit.c
@@ -147,10 +147,6 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
infoRec->GetImage = XAAGetImage;
if(!infoRec->GetSpans)
infoRec->GetSpans = XAAGetSpans;
- if(!infoRec->PaintWindowBackground)
- infoRec->PaintWindowBackground = XAAPaintWindow;
- if(!infoRec->PaintWindowBorder)
- infoRec->PaintWindowBorder = XAAPaintWindow;
if(!infoRec->CopyWindow)
infoRec->CopyWindow = XAACopyWindow;
@@ -162,10 +158,6 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
pScreen->GetImage = infoRec->GetImage;
pScreenPriv->GetSpans = pScreen->GetSpans;
pScreen->GetSpans = infoRec->GetSpans;
- pScreenPriv->PaintWindowBackground = pScreen->PaintWindowBackground;
- pScreen->PaintWindowBackground = infoRec->PaintWindowBackground;
- pScreenPriv->PaintWindowBorder = pScreen->PaintWindowBorder;
- pScreen->PaintWindowBorder = infoRec->PaintWindowBorder;
pScreenPriv->CopyWindow = pScreen->CopyWindow;
pScreen->CopyWindow = infoRec->CopyWindow;
pScreenPriv->CreatePixmap = pScreen->CreatePixmap;
@@ -236,8 +228,6 @@ XAACloseScreen (int i, ScreenPtr pScreen)
pScreen->CloseScreen = pScreenPriv->CloseScreen;
pScreen->GetImage = pScreenPriv->GetImage;
pScreen->GetSpans = pScreenPriv->GetSpans;
- pScreen->PaintWindowBackground = pScreenPriv->PaintWindowBackground;
- pScreen->PaintWindowBorder = pScreenPriv->PaintWindowBorder;
pScreen->CopyWindow = pScreenPriv->CopyWindow;
pScreen->WindowExposures = pScreenPriv->WindowExposures;
pScreen->CreatePixmap = pScreenPriv->CreatePixmap;
diff --git a/hw/xfree86/xaa/xaaOverlay.c b/hw/xfree86/xaa/xaaOverlay.c
index 016459091..86b30ff22 100644
--- a/hw/xfree86/xaa/xaaOverlay.c
+++ b/hw/xfree86/xaa/xaaOverlay.c
@@ -93,183 +93,6 @@ XAACopyWindow8_32(
REGION_DESTROY(pScreen, borderClip);
}
-
-
-
-static void
-XAAPaintWindow8_32(
- WindowPtr pWin,
- RegionPtr prgn,
- int what
-){
- ScreenPtr pScreen = pWin->drawable.pScreen;
- XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_DRAWABLE((&pWin->drawable));
- int nBox = REGION_NUM_RECTS(prgn);
- BoxPtr pBox = REGION_RECTS(prgn);
- PixmapPtr pPix = NULL;
- int depth = pWin->drawable.depth;
- int fg = 0, pm;
-
- if(!infoRec->pScrn->vtSema) goto BAILOUT;
-
- switch (what) {
- case PW_BACKGROUND:
- switch(pWin->backgroundState) {
- case None: return;
- case ParentRelative:
- do { pWin = pWin->parent; }
- while(pWin->backgroundState == ParentRelative);
- (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, prgn, what);
- return;
- case BackgroundPixel:
- fg = pWin->background.pixel;
- break;
- case BackgroundPixmap:
- pPix = pWin->background.pixmap;
- break;
- }
- break;
- case PW_BORDER:
- if (pWin->borderIsPixel)
- fg = pWin->border.pixel;
- else /* pixmap */
- pPix = pWin->border.pixmap;
- break;
- default: return;
- }
-
- if(depth == 8) {
- pm = 0xff000000;
- fg <<= 24;
- } else
- pm = 0x00ffffff;
-
- if(!pPix) {
- if(infoRec->FillSolidRects &&
- !(infoRec->FillSolidRectsFlags & NO_PLANEMASK) &&
- (!(infoRec->FillSolidRectsFlags & RGB_EQUAL) ||
- (depth == 8) || CHECK_RGB_EQUAL(fg)))
- {
- (*infoRec->FillSolidRects)(infoRec->pScrn, fg, GXcopy,
- pm, nBox, pBox);
- return;
- }
- } else { /* pixmap */
- XAAPixmapPtr pPriv = XAA_GET_PIXMAP_PRIVATE(pPix);
- WindowPtr pBgWin = pWin;
- int xorg, yorg;
-
- if (what == PW_BORDER) {
- for (pBgWin = pWin;
- pBgWin->backgroundState == ParentRelative;
- pBgWin = pBgWin->parent);
- }
-
- xorg = pBgWin->drawable.x;
- yorg = pBgWin->drawable.y;
-
-#ifdef PANORAMIX
- if(!noPanoramiXExtension) {
- int index = pScreen->myNum;
- if(WindowTable[index] == pBgWin) {
- xorg -= panoramiXdataPtr[index].x;
- yorg -= panoramiXdataPtr[index].y;
- }
- }
-#endif
-
- if(IS_OFFSCREEN_PIXMAP(pPix) && infoRec->FillCacheBltRects) {
- XAACacheInfoPtr pCache = &(infoRec->ScratchCacheInfoRec);
-
- pCache->x = pPriv->offscreenArea->box.x1;
- pCache->y = pPriv->offscreenArea->box.y1;
- pCache->w = pCache->orig_w =
- pPriv->offscreenArea->box.x2 - pCache->x;
- pCache->h = pCache->orig_h =
- pPriv->offscreenArea->box.y2 - pCache->y;
- pCache->trans_color = -1;
-
- (*infoRec->FillCacheBltRects)(infoRec->pScrn, GXcopy, pm,
- nBox, pBox, xorg, yorg, pCache);
-
- return;
- }
-
- if(pPriv->flags & DIRTY) {
- pPriv->flags &= ~(DIRTY | REDUCIBILITY_MASK);
- pPix->drawable.serialNumber = NEXT_SERIAL_NUMBER;
- }
-
- if(!(pPriv->flags & REDUCIBILITY_CHECKED) &&
- (infoRec->CanDoMono8x8 || infoRec->CanDoColor8x8)) {
- XAACheckTileReducibility(pPix, infoRec->CanDoMono8x8);
- }
-
- if(pPriv->flags & REDUCIBLE_TO_8x8) {
- if((pPriv->flags & REDUCIBLE_TO_2_COLOR) &&
- infoRec->CanDoMono8x8 && infoRec->FillMono8x8PatternRects &&
- !(infoRec->FillMono8x8PatternRectsFlags & NO_PLANEMASK) &&
- !(infoRec->FillMono8x8PatternRectsFlags & TRANSPARENCY_ONLY) &&
- (!(infoRec->FillMono8x8PatternRectsFlags & RGB_EQUAL) ||
- (CHECK_RGB_EQUAL(pPriv->fg) && CHECK_RGB_EQUAL(pPriv->bg))))
- {
- (*infoRec->FillMono8x8PatternRects)(infoRec->pScrn,
- pPriv->fg, pPriv->bg, GXcopy, pm, nBox, pBox,
- pPriv->pattern0, pPriv->pattern1, xorg, yorg);
- return;
- }
- if(infoRec->CanDoColor8x8 && infoRec->FillColor8x8PatternRects &&
- !(infoRec->FillColor8x8PatternRectsFlags & NO_PLANEMASK))
- {
- XAACacheInfoPtr pCache = (*infoRec->CacheColor8x8Pattern)(
- infoRec->pScrn, pPix, -1, -1);
-
- (*infoRec->FillColor8x8PatternRects) (infoRec->pScrn,
- GXcopy, pm, nBox, pBox, xorg, yorg, pCache);
- return;
- }
- }
-
- if(infoRec->UsingPixmapCache && infoRec->FillCacheBltRects &&
- !(infoRec->FillCacheBltRectsFlags & NO_PLANEMASK) &&
- (pPix->drawable.height <= infoRec->MaxCacheableTileHeight) &&
- (pPix->drawable.width <= infoRec->MaxCacheableTileWidth))
- {
- XAACacheInfoPtr pCache =
- (*infoRec->CacheTile)(infoRec->pScrn, pPix);
- (*infoRec->FillCacheBltRects)(infoRec->pScrn, GXcopy, pm,
- nBox, pBox, xorg, yorg, pCache);
- return;
- }
-
- if(infoRec->FillImageWriteRects &&
- !(infoRec->FillImageWriteRectsFlags & NO_PLANEMASK))
- {
- (*infoRec->FillImageWriteRects) (infoRec->pScrn, GXcopy,
- pm, nBox, pBox, xorg, yorg, pPix);
- return;
- }
- }
-
- if(infoRec->NeedToSync) {
- (*infoRec->Sync)(infoRec->pScrn);
- infoRec->NeedToSync = FALSE;
- }
-
-BAILOUT:
-
- if(what == PW_BACKGROUND) {
- XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBackground);
- (*pScreen->PaintWindowBackground) (pWin, prgn, what);
- XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBackground, XAAPaintWindow8_32);
- } else {
- XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBorder);
- (*pScreen->PaintWindowBorder) (pWin, prgn, what);
- XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBorder, XAAPaintWindow8_32);
- }
-}
-
-
static void
XAASetColorKey8_32(
ScreenPtr pScreen,
@@ -295,8 +118,6 @@ XAASetupOverlay8_32Planar(ScreenPtr pScreen)
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
int i;
- pScreen->PaintWindowBackground = XAAPaintWindow8_32;
- pScreen->PaintWindowBorder = XAAPaintWindow8_32;
pScreen->CopyWindow = XAACopyWindow8_32;
if(!(infoRec->FillSolidRectsFlags & NO_PLANEMASK))
diff --git a/hw/xfree86/xaa/xaaOverlayDF.c b/hw/xfree86/xaa/xaaOverlayDF.c
index 5897e323b..bf910982a 100644
--- a/hw/xfree86/xaa/xaaOverlayDF.c
+++ b/hw/xfree86/xaa/xaaOverlayDF.c
@@ -28,7 +28,6 @@
/* Screen funcs */
static void XAAOverCopyWindow(WindowPtr, DDXPointRec, RegionPtr);
-static void XAAOverPaintWindow(WindowPtr, RegionPtr, int);
static void XAAOverWindowExposures(WindowPtr, RegionPtr, RegionPtr);
static int XAAOverStippledFillChooser(GCPtr);
@@ -194,8 +193,6 @@ XAAInitDualFramebufferOverlay(
/* Overwrite key screen functions. The XAA core will clean up */
pScreen->CopyWindow = XAAOverCopyWindow;
- pScreen->PaintWindowBackground = XAAOverPaintWindow;
- pScreen->PaintWindowBorder = XAAOverPaintWindow;
pScreen->WindowExposures = XAAOverWindowExposures;
pOverPriv->StippledFillChooser = infoRec->StippledFillChooser;
@@ -410,56 +407,6 @@ XAAOverCopyWindow(
}
-static void
-XAAOverPaintWindow(
- WindowPtr pWin,
- RegionPtr pRegion,
- int what
-){
- ScreenPtr pScreen = pWin->drawable.pScreen;
- XAAOverlayPtr pOverPriv = GET_OVERLAY_PRIV(pScreen);
- XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
- ScrnInfoPtr pScrn = infoRec->pScrn;
-
- if(pScrn->vtSema) {
- if(what == PW_BACKGROUND) {
- SWITCH_DEPTH(pWin->drawable.depth);
- (*infoRec->PaintWindowBackground)(pWin, pRegion, what);
- return;
- } else {
- if(pWin->drawable.bitsPerPixel == 8) {
- SWITCH_DEPTH(8);
- (*infoRec->PaintWindowBorder)(pWin, pRegion, what);
- return;
- } else if (infoRec->FillSolidRects) {
- SWITCH_DEPTH(8);
- (*infoRec->FillSolidRects)(pScrn, pScrn->colorKey, GXcopy,
- ~0, REGION_NUM_RECTS(pRegion), REGION_RECTS(pRegion));
-
- SWITCH_DEPTH(pWin->drawable.depth);
- (*infoRec->PaintWindowBorder)(pWin, pRegion, what);
- return;
- }
- }
-
- if(infoRec->NeedToSync) {
- (*infoRec->Sync)(infoRec->pScrn);
- infoRec->NeedToSync = FALSE;
- }
- }
-
- if(what == PW_BACKGROUND) {
- XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBackground);
- (*pScreen->PaintWindowBackground) (pWin, pRegion, what);
- XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBackground, XAAOverPaintWindow);
- } else {
- XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBorder);
- (*pScreen->PaintWindowBorder) (pWin, pRegion, what);
- XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBorder, XAAOverPaintWindow);
- }
-}
-
-
void
XAAOverWindowExposures(
WindowPtr pWin,
diff --git a/hw/xfree86/xaa/xaaPaintWin.c b/hw/xfree86/xaa/xaaPaintWin.c
deleted file mode 100644
index af5680c67..000000000
--- a/hw/xfree86/xaa/xaaPaintWin.c
+++ /dev/null
@@ -1,200 +0,0 @@
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "misc.h"
-#include "xf86.h"
-#include "xf86_OSproc.h"
-
-#include <X11/X.h>
-#include "scrnintstr.h"
-#include "windowstr.h"
-#include "xf86str.h"
-#include "xaa.h"
-#include "xaalocal.h"
-#include "gcstruct.h"
-#include "pixmapstr.h"
-#include "xaawrap.h"
-
-#ifdef PANORAMIX
-#include "panoramiX.h"
-#include "panoramiXsrv.h"
-#endif
-
-void
-XAAPaintWindow(
- WindowPtr pWin,
- RegionPtr prgn,
- int what
-)
-{
- ScreenPtr pScreen = pWin->drawable.pScreen;
- XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_DRAWABLE((&pWin->drawable));
- int nBox = REGION_NUM_RECTS(prgn);
- BoxPtr pBox = REGION_RECTS(prgn);
- int fg = -1;
- PixmapPtr pPix = NULL;
-
- if(!infoRec->pScrn->vtSema) goto BAILOUT;
-
- switch (what) {
- case PW_BACKGROUND:
- switch(pWin->backgroundState) {
- case None: return;
- case ParentRelative:
- do { pWin = pWin->parent; }
- while(pWin->backgroundState == ParentRelative);
- (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, prgn, what);
- return;
- case BackgroundPixel:
- fg = pWin->background.pixel;
- break;
- case BackgroundPixmap:
- pPix = pWin->background.pixmap;
- break;
- }
- break;
- case PW_BORDER:
- if (pWin->borderIsPixel)
- fg = pWin->border.pixel;
- else /* pixmap */
- pPix = pWin->border.pixmap;
- break;
- default: return;
- }
-
-
- if(!pPix) {
- if(infoRec->FillSolidRects &&
- (!(infoRec->FillSolidRectsFlags & RGB_EQUAL) ||
- (CHECK_RGB_EQUAL(fg))) ) {
- (*infoRec->FillSolidRects)(infoRec->pScrn, fg, GXcopy, ~0,
- nBox, pBox);
- return;
- }
- } else { /* pixmap */
- XAAPixmapPtr pPriv = XAA_GET_PIXMAP_PRIVATE(pPix);
- WindowPtr pBgWin = pWin;
- Bool NoCache = FALSE;
- int xorg, yorg;
-
- /* Hack so we can use this with the dual framebuffer layers
- which only support the pixmap cache in the primary bpp */
- if(pPix->drawable.bitsPerPixel != infoRec->pScrn->bitsPerPixel)
- NoCache = TRUE;
-
- if (what == PW_BORDER) {
- for (pBgWin = pWin;
- pBgWin->backgroundState == ParentRelative;
- pBgWin = pBgWin->parent);
- }
-
- xorg = pBgWin->drawable.x;
- yorg = pBgWin->drawable.y;
-
-#ifdef PANORAMIX
- if(!noPanoramiXExtension) {
- int index = pScreen->myNum;
- if(WindowTable[index] == pBgWin) {
- xorg -= panoramiXdataPtr[index].x;
- yorg -= panoramiXdataPtr[index].y;
- }
- }
-#endif
-
- if(IS_OFFSCREEN_PIXMAP(pPix) && infoRec->FillCacheBltRects) {
- XAACacheInfoPtr pCache = &(infoRec->ScratchCacheInfoRec);
-
- pCache->x = pPriv->offscreenArea->box.x1;
- pCache->y = pPriv->offscreenArea->box.y1;
- pCache->w = pCache->orig_w =
- pPriv->offscreenArea->box.x2 - pCache->x;
- pCache->h = pCache->orig_h =
- pPriv->offscreenArea->box.y2 - pCache->y;
- pCache->trans_color = -1;
-
- (*infoRec->FillCacheBltRects)(infoRec->pScrn, GXcopy, ~0,
- nBox, pBox, xorg, yorg, pCache);
- return;
- }
-
- if(pPriv->flags & DIRTY) {
- pPriv->flags &= ~(DIRTY | REDUCIBILITY_MASK);
- pPix->drawable.serialNumber = NEXT_SERIAL_NUMBER;
- }
-
- if(!(pPriv->flags & REDUCIBILITY_CHECKED) &&
- (infoRec->CanDoMono8x8 || infoRec->CanDoColor8x8)) {
- XAACheckTileReducibility(pPix, infoRec->CanDoMono8x8);
- }
-
- if(pPriv->flags & REDUCIBLE_TO_8x8) {
- if((pPriv->flags & REDUCIBLE_TO_2_COLOR) &&
- infoRec->CanDoMono8x8 && infoRec->FillMono8x8PatternRects &&
- !(infoRec->FillMono8x8PatternRectsFlags & TRANSPARENCY_ONLY) &&
- (!(infoRec->FillMono8x8PatternRectsFlags & RGB_EQUAL) ||
- (CHECK_RGB_EQUAL(pPriv->fg) && CHECK_RGB_EQUAL(pPriv->bg)))) {
-
- (*infoRec->FillMono8x8PatternRects)(infoRec->pScrn,
- pPriv->fg, pPriv->bg, GXcopy, ~0, nBox, pBox,
- pPriv->pattern0, pPriv->pattern1, xorg, yorg);
- return;
- }
- if(infoRec->CanDoColor8x8 && !NoCache &&
- infoRec->FillColor8x8PatternRects) {
- XAACacheInfoPtr pCache = (*infoRec->CacheColor8x8Pattern)(
- infoRec->pScrn, pPix, -1, -1);
-
- (*infoRec->FillColor8x8PatternRects) ( infoRec->pScrn,
- GXcopy, ~0, nBox, pBox, xorg, yorg, pCache);
- return;
- }
- }
-
- /* The window size check is to reduce pixmap cache thrashing
- when there are lots of little windows with pixmap backgrounds
- like are sometimes used for buttons, etc... */
-
- if(infoRec->UsingPixmapCache &&
- infoRec->FillCacheBltRects && !NoCache &&
- ((what == PW_BORDER) ||
- (pPix->drawable.height != pWin->drawable.height) ||
- (pPix->drawable.width != pWin->drawable.width)) &&
- (pPix->drawable.height <= infoRec->MaxCacheableTileHeight) &&
- (pPix->drawable.width <= infoRec->MaxCacheableTileWidth)) {
-
- XAACacheInfoPtr pCache =
- (*infoRec->CacheTile)(infoRec->pScrn, pPix);
- (*infoRec->FillCacheBltRects)(infoRec->pScrn, GXcopy, ~0,
- nBox, pBox, xorg, yorg, pCache);
- return;
- }
-
- if(infoRec->FillImageWriteRects &&
- !(infoRec->FillImageWriteRectsFlags & NO_GXCOPY)) {
- (*infoRec->FillImageWriteRects) (infoRec->pScrn, GXcopy,
- ~0, nBox, pBox, xorg, yorg, pPix);
- return;
- }
- }
-
-
- if(infoRec->NeedToSync) {
- (*infoRec->Sync)(infoRec->pScrn);
- infoRec->NeedToSync = FALSE;
- }
-
-BAILOUT:
-
- if(what == PW_BACKGROUND) {
- XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBackground);
- (*pScreen->PaintWindowBackground) (pWin, prgn, what);
- XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBackground, XAAPaintWindow);
- } else {
- XAA_SCREEN_PROLOGUE (pScreen, PaintWindowBorder);
- (*pScreen->PaintWindowBorder) (pWin, prgn, what);
- XAA_SCREEN_EPILOGUE(pScreen, PaintWindowBorder, XAAPaintWindow);
- }
-
-}
diff --git a/hw/xfree86/xaa/xaaStateChange.c b/hw/xfree86/xaa/xaaStateChange.c
index 711f7791f..02c556b33 100644
--- a/hw/xfree86/xaa/xaaStateChange.c
+++ b/hw/xfree86/xaa/xaaStateChange.c
@@ -259,8 +259,6 @@ typedef struct _XAAStateWrapRec {
XAACacheInfoPtr pCache);
GetImageProcPtr GetImage;
GetSpansProcPtr GetSpans;
- PaintWindowBackgroundProcPtr PaintWindowBackground;
- PaintWindowBorderProcPtr PaintWindowBorder;
CopyWindowProcPtr CopyWindow;
#ifdef RENDER
Bool (*SetupForCPUToScreenAlphaTexture2)(ScrnInfoPtr pScrn, int op,
@@ -1449,26 +1447,6 @@ static void XAAStateWrapGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr pp
pwidth, nspans, pdstStart);
}
-static void XAAStateWrapPaintWindowBackground(WindowPtr pWindow, RegionPtr pRegion,
- int what)
-{
- GET_STATEPRIV_SCREEN(pWindow->drawable.pScreen);
- STATE_CHECK_SP(pStatePriv);
-
- (*pStatePriv->PaintWindowBackground)(pWindow, pRegion,
- what);
-}
-
-static void XAAStateWrapPaintWindowBorder(WindowPtr pWindow, RegionPtr pRegion,
- int what)
-{
- GET_STATEPRIV_SCREEN(pWindow->drawable.pScreen);
- STATE_CHECK_SP(pStatePriv);
-
- (*pStatePriv->PaintWindowBorder)(pWindow, pRegion,
- what);
-}
-
static void XAAStateWrapCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg,
RegionPtr prgnSrc)
{
@@ -1649,8 +1627,6 @@ XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec)
XAA_STATE_WRAP(WriteColor8x8PatternToCache);
XAA_STATE_WRAP(GetImage);
XAA_STATE_WRAP(GetSpans);
- XAA_STATE_WRAP(PaintWindowBackground);
- XAA_STATE_WRAP(PaintWindowBorder);
XAA_STATE_WRAP(CopyWindow);
#ifdef RENDER
XAA_STATE_WRAP(SetupForCPUToScreenAlphaTexture2);
diff --git a/hw/xfree86/xaa/xaaWrapper.c b/hw/xfree86/xaa/xaaWrapper.c
index 6d8107b61..b0176f03f 100644
--- a/hw/xfree86/xaa/xaaWrapper.c
+++ b/hw/xfree86/xaa/xaaWrapper.c
@@ -54,8 +54,6 @@ typedef struct {
CreateScreenResourcesProcPtr CreateScreenResources;
CreateWindowProcPtr CreateWindow;
CopyWindowProcPtr CopyWindow;
- PaintWindowProcPtr PaintWindowBackground;
- PaintWindowProcPtr PaintWindowBorder;
WindowExposuresProcPtr WindowExposures;
CreateGCProcPtr CreateGC;
CreateColormapProcPtr CreateColormap;
@@ -73,8 +71,6 @@ typedef struct {
CreateScreenResourcesProcPtr wrapCreateScreenResources;
CreateWindowProcPtr wrapCreateWindow;
CopyWindowProcPtr wrapCopyWindow;
- PaintWindowProcPtr wrapPaintWindowBackground;
- PaintWindowProcPtr wrapPaintWindowBorder;
WindowExposuresProcPtr wrapWindowExposures;
CreateGCProcPtr wrapCreateGC;
CreateColormapProcPtr wrapCreateColormap;
@@ -208,33 +204,6 @@ xaaWrapperWindowExposures (WindowPtr pWin,
WindowExposures, wrapWindowExposures, xaaWrapperWindowExposures);
}
-static void
-xaaWrapperPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
-{
- xaaWrapperScrPriv(pWin->drawable.pScreen);
-
- switch (what) {
- case PW_BORDER:
- cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
- PaintWindowBorder, wrapPaintWindowBorder);
-
- pWin->drawable.pScreen->PaintWindowBorder (pWin, pRegion, what);
- cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
- PaintWindowBorder, wrapPaintWindowBorder,
- xaaWrapperPaintWindow);
- break;
- case PW_BACKGROUND:
- cond_unwrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
- PaintWindowBackground, wrapPaintWindowBackground);
-
- pWin->drawable.pScreen->PaintWindowBackground (pWin, pRegion, what);
- cond_wrap(pScrPriv, &pWin->drawable, pWin->drawable.pScreen,
- PaintWindowBackground, wrapPaintWindowBackground,
- xaaWrapperPaintWindow);
- break;
- }
-}
-
static Bool
xaaWrapperCreateColormap(ColormapPtr pmap)
{
@@ -327,8 +296,6 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f
get (pScrPriv, pScreen, CreateScreenResources, wrapCreateScreenResources);
get (pScrPriv, pScreen, CreateWindow, wrapCreateWindow);
get (pScrPriv, pScreen, CopyWindow, wrapCopyWindow);
- get (pScrPriv, pScreen, PaintWindowBorder, wrapPaintWindowBorder);
- get (pScrPriv, pScreen, PaintWindowBackground, wrapPaintWindowBackground);
get (pScrPriv, pScreen, WindowExposures, wrapWindowExposures);
get (pScrPriv, pScreen, CreateGC, wrapCreateGC);
get (pScrPriv, pScreen, CreateColormap, wrapCreateColormap);
@@ -351,8 +318,6 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f
xaaWrapperCreateScreenResources);
wrap (pScrPriv, pScreen, CreateWindow, xaaWrapperCreateWindow);
wrap (pScrPriv, pScreen, CopyWindow, xaaWrapperCopyWindow);
- wrap (pScrPriv, pScreen, PaintWindowBorder, xaaWrapperPaintWindow);
- wrap (pScrPriv, pScreen, PaintWindowBackground, xaaWrapperPaintWindow);
wrap (pScrPriv, pScreen, WindowExposures, xaaWrapperWindowExposures);
wrap (pScrPriv, pScreen, CreateGC, xaaWrapperCreateGC);
wrap (pScrPriv, pScreen, CreateColormap, xaaWrapperCreateColormap);
diff --git a/hw/xfree86/xaa/xaalocal.h b/hw/xfree86/xaa/xaalocal.h
index 3ddea241c..686cc876d 100644
--- a/hw/xfree86/xaa/xaalocal.h
+++ b/hw/xfree86/xaa/xaalocal.h
@@ -45,8 +45,6 @@ typedef struct _XAAScreen {
CloseScreenProcPtr CloseScreen;
GetImageProcPtr GetImage;
GetSpansProcPtr GetSpans;
- PaintWindowBackgroundProcPtr PaintWindowBackground;
- PaintWindowBorderProcPtr PaintWindowBorder;
CopyWindowProcPtr CopyWindow;
WindowExposuresProcPtr WindowExposures;
CreatePixmapProcPtr CreatePixmap;
@@ -1315,14 +1313,6 @@ XAAWritePixmapToCacheLinear(
int bpp, int depth
);
-
-void
-XAAPaintWindow(
- WindowPtr pWin,
- RegionPtr prgn,
- int what
-);
-
void
XAASolidHorVertLineAsRects(
ScrnInfoPtr pScrn,
diff --git a/hw/xfree86/xf1bpp/Makefile.am b/hw/xfree86/xf1bpp/Makefile.am
index 4ea7ef0c1..c724f760f 100644
--- a/hw/xfree86/xf1bpp/Makefile.am
+++ b/hw/xfree86/xf1bpp/Makefile.am
@@ -45,7 +45,6 @@ libxf1bppmfb_a_SOURCES = \
mfbline.c \
mfbmisc.c \
mfbpixmap.c \
- mfbpntwin.c \
mfbpolypnt.c \
mfbpushpxl.c \
mfbscrclse.c \
diff --git a/hw/xfree86/xf1bpp/mfbmap.h b/hw/xfree86/xf1bpp/mfbmap.h
index 5825c1cf4..e330ebd5b 100644
--- a/hw/xfree86/xf1bpp/mfbmap.h
+++ b/hw/xfree86/xf1bpp/mfbmap.h
@@ -61,7 +61,6 @@
#define mfbListInstalledColormaps xf1bppListInstalledColormaps
#define mfbMapWindow xf1bppMapWindow
#define mfbPadPixmap xf1bppPadPixmap
-#define mfbPaintWindow xf1bppPaintWindow
#define mfbPixmapToRegion xf1bppPixmapToRegion
#define mfbPixmapToRegionWeak xf1bppPixmapToRegionWeak
#define mfbPolyFillArcSolid xf1bppPolyFillArcSolid
diff --git a/hw/xfree86/xf1bpp/mfbunmap.h b/hw/xfree86/xf1bpp/mfbunmap.h
index 16237a163..56b734bcd 100644
--- a/hw/xfree86/xf1bpp/mfbunmap.h
+++ b/hw/xfree86/xf1bpp/mfbunmap.h
@@ -53,7 +53,6 @@
#undef mfbListInstalledColormaps
#undef mfbMapWindow
#undef mfbPadPixmap
-#undef mfbPaintWindow
#undef mfbPixmapToRegion
#undef mfbPixmapToRegionWeak
#undef mfbPolyFillArcSolid
diff --git a/hw/xfree86/xf4bpp/Makefile.am b/hw/xfree86/xf4bpp/Makefile.am
index 8665b2a6b..1414a0d0f 100644
--- a/hw/xfree86/xf4bpp/Makefile.am
+++ b/hw/xfree86/xf4bpp/Makefile.am
@@ -17,7 +17,6 @@ libxf4bpp_la_SOURCES = \
ppcGetSp.c \
ppcImg.c \
ppcPixmap.c \
- ppcPntWin.c \
ppcPolyPnt.c \
ppcQuery.c \
ppcRslvC.c \
diff --git a/hw/xfree86/xf4bpp/ppcGC.c b/hw/xfree86/xf4bpp/ppcGC.c
index b59dab312..674a38b78 100644
--- a/hw/xfree86/xf4bpp/ppcGC.c
+++ b/hw/xfree86/xf4bpp/ppcGC.c
@@ -176,8 +176,7 @@ register GCPtr pGC ;
pGC->fExpose = TRUE;
pGC->freeCompClip = FALSE;
- pGC->pRotatedPixmap = NullPixmap;
-
+
/* GJA: I don't like this code:
* they allocated a mfbPrivGC, ignore the allocated data and place
* a pointer to a ppcPrivGC in its slot.
@@ -200,12 +199,6 @@ xf4bppDestroyGC( pGC )
{
TRACE( ( "xf4bppDestroyGC(pGC=0x%x)\n", pGC ) ) ;
- /* (ef) 11/9/87 -- ppc doesn't use rotated tile or stipple, but */
- /* *does* call mfbValidateGC under some conditions. */
- /* mfbValidateGC *does* use rotated tile and stipple */
- if ( pGC->pRotatedPixmap )
- mfbDestroyPixmap( pGC->pRotatedPixmap ) ;
-
if ( pGC->freeCompClip && pGC->pCompositeClip )
REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip);
if(pGC->ops->devPrivate.val) xfree( pGC->ops );
diff --git a/hw/xfree86/xf4bpp/ppcIO.c b/hw/xfree86/xf4bpp/ppcIO.c
index 8d726e758..313fcb0f8 100644
--- a/hw/xfree86/xf4bpp/ppcIO.c
+++ b/hw/xfree86/xf4bpp/ppcIO.c
@@ -205,8 +205,6 @@ xf4bppScreenInit( pScreen, pbits, virtx, virty, dpix, dpiy, width )
pScreen-> CreateWindow = xf4bppCreateWindowForXYhardware;
pScreen-> DestroyWindow = xf4bppDestroyWindow;
pScreen-> PositionWindow = xf4bppPositionWindow;
- pScreen-> PaintWindowBackground = xf4bppPaintWindow;
- pScreen-> PaintWindowBorder = xf4bppPaintWindow;
pScreen-> CopyWindow = xf4bppCopyWindow;
pScreen-> CreatePixmap = xf4bppCreatePixmap;
pScreen-> CreateGC = xf4bppCreateGC;
@@ -219,7 +217,7 @@ xf4bppScreenInit( pScreen, pbits, virtx, virty, dpix, dpiy, width )
pScreen-> ResolveColor = xf4bppResolveColor;
mfbFillInScreen(pScreen);
- if (!mfbAllocatePrivates(pScreen, (int*)NULL, (int*)NULL))
+ if (!mfbAllocatePrivates(pScreen, NULL))
return FALSE;
if (!miScreenInit(pScreen, pbits, virtx, virty, dpix, dpiy, width,
diff --git a/hw/xfree86/xf4bpp/ppcPntWin.c b/hw/xfree86/xf4bpp/ppcPntWin.c
deleted file mode 100644
index 5d7a07e12..000000000
--- a/hw/xfree86/xf4bpp/ppcPntWin.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright IBM Corporation 1987,1988,1989
- *
- * All Rights Reserved
- *
- * Permission to use, copy, modify, and distribute this software and its
- * documentation for any purpose and without fee is hereby granted,
- * provided that the above copyright notice appear in all copies and that
- * both that copyright notice and this permission notice appear in
- * supporting documentation, and that the name of IBM not be
- * used in advertising or publicity pertaining to distribution of the
- * software without specific, written prior permission.
- *
- * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
- * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
- * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
- * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
-*/
-
-/***********************************************************
-
-Copyright (c) 1987 X Consortium
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of the X Consortium shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from the X Consortium.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf4bpp.h"
-#include "mfbmap.h"
-#include "mfb.h"
-#include "mi.h"
-#include "scrnintstr.h"
-#include "ibmTrace.h"
-
-/* NOTE: These functions only work for visuals up to 31-bits deep */
-static void xf4bppPaintWindowSolid(
- WindowPtr,
- RegionPtr,
- int
-);
-static void xf4bppPaintWindowTile(
- WindowPtr,
- RegionPtr,
- int
-);
-
-void
-xf4bppPaintWindow(pWin, pRegion, what)
- WindowPtr pWin;
- RegionPtr pRegion;
- int what;
-{
-
- register mfbPrivWin *pPrivWin;
- pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbGetWindowPrivateIndex()].ptr);
-
- TRACE(("xf4bppPaintWindow( pWin= 0x%x, pRegion= 0x%x, what= %d )\n",
- pWin,pRegion,what));
-
- switch (what) {
- case PW_BACKGROUND:
- switch (pWin->backgroundState) {
- case None:
- return;
- case ParentRelative:
- do {
- pWin = pWin->parent;
- } while (pWin->backgroundState == ParentRelative);
- (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, pRegion,
- what);
- return;
- case BackgroundPixmap:
- if (pPrivWin->fastBackground)
- {
- xf4bppPaintWindowTile(pWin, pRegion, what);
- return;
- }
- break;
- case BackgroundPixel:
- xf4bppPaintWindowSolid(pWin, pRegion, what);
- return;
- }
- break;
- case PW_BORDER:
- if (pWin->borderIsPixel)
- {
- xf4bppPaintWindowSolid(pWin, pRegion, what);
- return;
- }
- else if (pPrivWin->fastBorder)
- {
- xf4bppPaintWindowTile(pWin, pRegion, what);
- return;
- }
- break;
- }
- miPaintWindow(pWin, pRegion, what);
-}
-
-static void
-xf4bppPaintWindowSolid(pWin, pRegion, what)
- register WindowPtr pWin;
- register RegionPtr pRegion;
- int what;
-{
- register int nbox;
- register BoxPtr pbox;
- register unsigned long int pixel;
- register unsigned long int pm ;
-
- TRACE(("xf4bppPaintWindowSolid(pWin= 0x%x, pRegion= 0x%x, what= %d)\n", pWin, pRegion, what));
-
- if ( !( nbox = REGION_NUM_RECTS(pRegion)))
- return ;
- pbox = REGION_RECTS(pRegion);
-
- if (what == PW_BACKGROUND)
- pixel = pWin->background.pixel;
- else
- pixel = pWin->border.pixel;
-
- pm = ( 1 << pWin->drawable.depth ) - 1 ;
- for ( ; nbox-- ; pbox++ ) {
- /*
- * call fill routine, the parms are:
- * fill(color, alu, planes, x, y, width, height);
- */
- xf4bppFillSolid( pWin, pixel, GXcopy, pm, pbox->x1, pbox->y1,
- pbox->x2 - pbox->x1, pbox->y2 - pbox->y1 ) ;
- }
- return ;
-}
-
-static void
-xf4bppPaintWindowTile(pWin, pRegion, what)
- register WindowPtr pWin;
- register RegionPtr pRegion;
- int what;
-{
- register int nbox;
- register BoxPtr pbox;
- register PixmapPtr pTile;
- register unsigned long int pm ;
-
- TRACE(("xf4bppPaintWindowTile(pWin= 0x%x, pRegion= 0x%x, what= %d)\n", pWin, pRegion, what));
-
- if ( !( nbox = REGION_NUM_RECTS(pRegion)))
- return ;
- pbox = REGION_RECTS(pRegion);
-
- if (what == PW_BACKGROUND)
- pTile = pWin->background.pixmap;
- else
- pTile = pWin->border.pixmap;
-
- pm = ( 1 << pWin->drawable.depth ) - 1 ;
- for ( ; nbox-- ; pbox++ ) {
- /*
- * call tile routine, the parms are:
- * tile(tile, alu, planes, x, y, width, height,xSrc,ySrc);
- */
- xf4bppTileRect(pWin, pTile, GXcopy, pm,
- pbox->x1, pbox->y1,
- pbox->x2 - pbox->x1, pbox->y2 - pbox->y1,
- pWin->drawable.x, pWin->drawable.y );
- }
- return ;
-}
diff --git a/hw/xfree86/xf4bpp/ppcWindow.c b/hw/xfree86/xf4bpp/ppcWindow.c
index 01768d9ff..8261af183 100644
--- a/hw/xfree86/xf4bpp/ppcWindow.c
+++ b/hw/xfree86/xf4bpp/ppcWindow.c
@@ -214,15 +214,7 @@ Bool
xf4bppCreateWindowForXYhardware(pWin)
register WindowPtr pWin ;
{
- register mfbPrivWin *pPrivWin;
-
TRACE(("xf4bppCreateWindowForXYhardware (pWin= 0x%x)\n", pWin));
- pPrivWin = (mfbPrivWin *)(pWin->devPrivates[mfbGetWindowPrivateIndex()].ptr);
- pPrivWin->pRotatedBorder = NullPixmap;
- pPrivWin->pRotatedBackground = NullPixmap;
- pPrivWin->fastBackground = 0;
- pPrivWin->fastBorder = 0;
-
return TRUE;
}
diff --git a/hw/xfree86/xf4bpp/xf4bpp.h b/hw/xfree86/xf4bpp/xf4bpp.h
index 5d5dcdd9f..e7e3721f7 100644
--- a/hw/xfree86/xf4bpp/xf4bpp.h
+++ b/hw/xfree86/xf4bpp/xf4bpp.h
@@ -189,13 +189,6 @@ PixmapPtr xf4bppCopyPixmap(
PixmapPtr
);
-/* ppcPntWin.c */
-void xf4bppPaintWindow(
- WindowPtr,
- RegionPtr,
- int
-);
-
/* ppcPolyPnt.c */
void xf4bppPolyPoint(
DrawablePtr,
diff --git a/hw/xfree86/xf8_32bpp/cfb8_32.h b/hw/xfree86/xf8_32bpp/cfb8_32.h
index 31028a30b..e14096568 100644
--- a/hw/xfree86/xf8_32bpp/cfb8_32.h
+++ b/hw/xfree86/xf8_32bpp/cfb8_32.h
@@ -111,13 +111,6 @@ cfb8_32GetImage (
char *pdstLine
);
-void
-cfb8_32PaintWindow (
- WindowPtr pWin,
- RegionPtr pRegion,
- int what
-);
-
Bool
cfb8_32ScreenInit (
ScreenPtr pScreen,
@@ -135,15 +128,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 29dc6691f..5e2657f2b 100644
--- a/hw/xfree86/xf8_32bpp/cfbscrinit.c
+++ b/hw/xfree86/xf8_32bpp/cfbscrinit.c
@@ -56,11 +56,7 @@ cfb8_32AllocatePrivates(ScreenPtr pScreen)
/* All cfb will have the same GC and Window private indicies */
- if(!mfbAllocatePrivates(pScreen,&cfbWindowPrivateIndex, &cfbGCPrivateIndex))
- return FALSE;
-
- /* The cfb indicies are the mfb indicies. Reallocating them resizes them */
- if(!AllocateWindowPrivate(pScreen,cfbWindowPrivateIndex,sizeof(cfbPrivWin)))
+ if(!mfbAllocatePrivates(pScreen, &cfbGCPrivateIndex))
return FALSE;
if(!AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC)))
@@ -109,8 +105,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 c5585ca6d..3cd351ad0 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;
@@ -284,16 +281,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;
@@ -402,8 +395,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);
@@ -435,62 +426,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 *****************************/