Remove the PaintWindow optimization.

This was an attempt to avoid scratch gc creation and validation for paintwin
because that was expensive.  This is not the case in current servers, and the
danger of failure to implement it correctly (as seen in all previous
implementations) is high enough to justify removing it.  No performance
difference detected with x11perf -create -move -resize -circulate on Xvfb.
Leave the screen hooks for PaintWindow* in for now to avoid ABI change.
This commit is contained in:
Eric Anholt
2007-09-12 13:58:46 +00:00
parent 6da39c6790
commit e4d11e58ce
107 changed files with 62 additions and 4720 deletions

View File

@@ -470,7 +470,6 @@ void s3CursorDisable (ScreenPtr pScreen);
void s3CursorFini (ScreenPtr pScreen);
void s3RecolorCursor (ScreenPtr pScreen, int ndef, xColorItem *pdefs);
void s3DumbPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what);
void s3DumbCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
Bool s3DrawInit (ScreenPtr pScreen);

View File

@@ -2261,71 +2261,6 @@ s3PaintKey (DrawablePtr pDrawable,
}
#endif
void
s3PaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
{
SetupS3(pWin->drawable.pScreen);
s3ScreenInfo(pScreenPriv);
s3PatternPtr pPattern;
DRAW_DEBUG ((DEBUG_PAINT_WINDOW, "s3PaintWindow 0x%x extents %d %d %d %d n %d",
pWin->drawable.id,
pRegion->extents.x1, pRegion->extents.y1,
pRegion->extents.x2, pRegion->extents.y2,
REGION_NUM_RECTS(pRegion)));
if (!REGION_NUM_RECTS(pRegion))
return;
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:
pPattern = s3GetWindowPrivate(pWin);
if (pPattern)
{
s3FillBoxPattern ((DrawablePtr)pWin,
(int)REGION_NUM_RECTS(pRegion),
REGION_RECTS(pRegion),
GXcopy, ~0, pPattern);
return;
}
break;
case BackgroundPixel:
s3FillBoxSolid((DrawablePtr)pWin,
(int)REGION_NUM_RECTS(pRegion),
REGION_RECTS(pRegion),
pWin->background.pixel, GXcopy, ~0);
return;
}
break;
case PW_BORDER:
#ifndef S3_TRIO
if (s3s->fbmap[1] >= 0)
fbOverlayUpdateLayerRegion (pWin->drawable.pScreen,
fbOverlayWindowLayer (pWin),
pRegion);
#endif
if (pWin->borderIsPixel)
{
s3FillBoxSolid((DrawablePtr)pWin,
(int)REGION_NUM_RECTS(pRegion),
REGION_RECTS(pRegion),
pWin->border.pixel, GXcopy, ~0);
return;
}
break;
}
KdCheckPaintWindow (pWin, pRegion, what);
}
void
s3CopyWindowProc (DrawablePtr pSrcDrawable,
DrawablePtr pDstDrawable,
@@ -3006,55 +2941,6 @@ s3_24CreateWindow(WindowPtr pWin)
return fbCreateWindow (pWin);
}
void
s3_24PaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
{
SetupS3(pWin->drawable.pScreen);
s3PatternPtr pPattern;
DRAW_DEBUG ((DEBUG_PAINT_WINDOW, "s3PaintWindow 0x%x extents %d %d %d %d n %d",
pWin->drawable.id,
pRegion->extents.x1, pRegion->extents.y1,
pRegion->extents.x2, pRegion->extents.y2,
REGION_NUM_RECTS(pRegion)));
if (!REGION_NUM_RECTS(pRegion))
return;
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 BackgroundPixel:
if (ok24(pWin->background.pixel))
{
s3_24FillBoxSolid((DrawablePtr)pWin,
(int)REGION_NUM_RECTS(pRegion),
REGION_RECTS(pRegion),
pWin->background.pixel, GXcopy, ~0);
return;
}
}
break;
case PW_BORDER:
if (pWin->borderIsPixel && ok24(pWin->border.pixel))
{
s3_24FillBoxSolid((DrawablePtr)pWin,
(int)REGION_NUM_RECTS(pRegion),
REGION_RECTS(pRegion),
pWin->border.pixel, GXcopy, ~0);
return;
}
break;
}
KdCheckPaintWindow (pWin, pRegion, what);
}
Bool
s3DrawInit (ScreenPtr pScreen)
@@ -3089,8 +2975,6 @@ s3DrawInit (ScreenPtr pScreen)
{
pScreen->CreateGC = s3_24CreateGC;
pScreen->CreateWindow = s3_24CreateWindow;
pScreen->PaintWindowBackground = s3_24PaintWindow;
pScreen->PaintWindowBorder = s3_24PaintWindow;
pScreen->CopyWindow = s3CopyWindow;
}
else
@@ -3109,8 +2993,6 @@ s3DrawInit (ScreenPtr pScreen)
pScreen->CreateWindow = s3CreateWindow;
pScreen->ChangeWindowAttributes = s3ChangeWindowAttributes;
pScreen->DestroyWindow = s3DestroyWindow;
pScreen->PaintWindowBackground = s3PaintWindow;
pScreen->PaintWindowBorder = s3PaintWindow;
#ifndef S3_TRIO
if (pScreenPriv->screen->fb[1].depth)
{