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

@@ -71,8 +71,6 @@ SOFTWARE.
int frameWindowPrivateIndex;
int frameGetWindowPrivateIndex(void) { return frameWindowPrivateIndex; }
#endif
int mfbWindowPrivateIndex;
int mfbGetWindowPrivateIndex(void) { return mfbWindowPrivateIndex; }
int mfbGCPrivateIndex;
int mfbGetGCPrivateIndex(void) { return mfbGCPrivateIndex; }
static unsigned long mfbGeneration = 0;
@@ -90,30 +88,23 @@ static DepthRec depth = {
};
Bool
mfbAllocatePrivates(pScreen, pWinIndex, pGCIndex)
ScreenPtr pScreen;
int *pWinIndex, *pGCIndex;
mfbAllocatePrivates(ScreenPtr pScreen, int *pGCIndex)
{
if (mfbGeneration != serverGeneration)
{
#ifdef PIXMAP_PER_WINDOW
frameWindowPrivateIndex = AllocateWindowPrivateIndex();
#endif
mfbWindowPrivateIndex = AllocateWindowPrivateIndex();
mfbGCPrivateIndex = miAllocateGCPrivateIndex();
visual.vid = FakeClientID(0);
VID = visual.vid;
mfbGeneration = serverGeneration;
}
if (pWinIndex)
*pWinIndex = mfbWindowPrivateIndex;
if (pGCIndex)
*pGCIndex = mfbGCPrivateIndex;
pScreen->GetWindowPixmap = mfbGetWindowPixmap;
pScreen->SetWindowPixmap = mfbSetWindowPixmap;
return (AllocateWindowPrivate(pScreen, mfbWindowPrivateIndex,
sizeof(mfbPrivWin)) &&
AllocateGCPrivate(pScreen, mfbGCPrivateIndex, sizeof(mfbPrivGC)));
return AllocateGCPrivate(pScreen, mfbGCPrivateIndex, sizeof(mfbPrivGC));
}
@@ -126,7 +117,7 @@ mfbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
int dpix, dpiy; /* dots per inch */
int width; /* pixel width of frame buffer */
{
if (!mfbAllocatePrivates(pScreen, (int *)NULL, (int *)NULL))
if (!mfbAllocatePrivates(pScreen, NULL))
return FALSE;
pScreen->defColormap = (Colormap) FakeClientID(0);
/* whitePixel, blackPixel */
@@ -135,13 +126,9 @@ mfbScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width)
pScreen->GetImage = mfbGetImage;
pScreen->GetSpans = mfbGetSpans;
pScreen->CreateWindow = mfbCreateWindow;
pScreen->DestroyWindow = mfbDestroyWindow;
pScreen->PositionWindow = mfbPositionWindow;
pScreen->ChangeWindowAttributes = mfbChangeWindowAttributes;
pScreen->RealizeWindow = mfbMapWindow;
pScreen->UnrealizeWindow = mfbUnmapWindow;
pScreen->PaintWindowBackground = mfbPaintWindow;
pScreen->PaintWindowBorder = mfbPaintWindow;
pScreen->CopyWindow = mfbCopyWindow;
pScreen->CreatePixmap = mfbCreatePixmap;
pScreen->DestroyPixmap = mfbDestroyPixmap;