summaryrefslogtreecommitdiff
path: root/mfb/mfbscrinit.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-09-12 13:58:46 +0000
committerEric Anholt <eric@anholt.net>2007-09-13 00:08:53 +0000
commite4d11e58ce349dfe6af2f73ff341317f9b39684c (patch)
tree05509150343f56d8ec6c88e8da338bf99e6ec03f /mfb/mfbscrinit.c
parent6da39c67905500ab2db00a45cda4a9f756cdde96 (diff)
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.
Diffstat (limited to 'mfb/mfbscrinit.c')
-rw-r--r--mfb/mfbscrinit.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/mfb/mfbscrinit.c b/mfb/mfbscrinit.c
index 13ea5d365..6d364b76c 100644
--- a/mfb/mfbscrinit.c
+++ b/mfb/mfbscrinit.c
@@ -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;