diff options
author | Eric Anholt <eric@anholt.net> | 2007-09-12 13:58:46 +0000 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-09-13 00:08:53 +0000 |
commit | e4d11e58ce349dfe6af2f73ff341317f9b39684c (patch) | |
tree | 05509150343f56d8ec6c88e8da338bf99e6ec03f /composite | |
parent | 6da39c67905500ab2db00a45cda4a9f756cdde96 (diff) | |
download | xserver-e4d11e58ce349dfe6af2f73ff341317f9b39684c.tar.gz |
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 'composite')
-rw-r--r-- | composite/compinit.c | 4 | ||||
-rw-r--r-- | composite/compint.h | 4 | ||||
-rw-r--r-- | composite/compwindow.c | 17 |
3 files changed, 1 insertions, 24 deletions
diff --git a/composite/compinit.c b/composite/compinit.c index c557eebc4..5f09fe2a4 100644 --- a/composite/compinit.c +++ b/composite/compinit.c @@ -70,7 +70,6 @@ compCloseScreen (int index, ScreenPtr pScreen) pScreen->ChangeBorderWidth = cs->ChangeBorderWidth; pScreen->ClipNotify = cs->ClipNotify; - pScreen->PaintWindowBackground = cs->PaintWindowBackground; pScreen->UnrealizeWindow = cs->UnrealizeWindow; pScreen->RealizeWindow = cs->RealizeWindow; pScreen->DestroyWindow = cs->DestroyWindow; @@ -431,9 +430,6 @@ compScreenInit (ScreenPtr pScreen) cs->UnrealizeWindow = pScreen->UnrealizeWindow; pScreen->UnrealizeWindow = compUnrealizeWindow; - cs->PaintWindowBackground = pScreen->PaintWindowBackground; - pScreen->PaintWindowBackground = compPaintWindowBackground; - cs->ClipNotify = pScreen->ClipNotify; pScreen->ClipNotify = compClipNotify; diff --git a/composite/compint.h b/composite/compint.h index f69595ccc..535e1a423 100644 --- a/composite/compint.h +++ b/composite/compint.h @@ -123,7 +123,6 @@ typedef struct _CompScreen { DestroyWindowProcPtr DestroyWindow; RealizeWindowProcPtr RealizeWindow; UnrealizeWindowProcPtr UnrealizeWindow; - PaintWindowProcPtr PaintWindowBackground; ClipNotifyProcPtr ClipNotify; /* * Called from ConfigureWindow, these @@ -256,9 +255,6 @@ Bool compUnrealizeWindow (WindowPtr pWin); void -compPaintWindowBackground (WindowPtr pWin, RegionPtr pRegion, int what); - -void compClipNotify (WindowPtr pWin, int dx, int dy); void diff --git a/composite/compwindow.c b/composite/compwindow.c index bfd29460b..579236713 100644 --- a/composite/compwindow.c +++ b/composite/compwindow.c @@ -99,7 +99,7 @@ compRepaintBorder (ClientPtr pClient, pointer closure) REGION_NULL(pScreen, &exposed); REGION_SUBTRACT(pScreen, &exposed, &pWindow->borderClip, &pWindow->winSize); - (*pWindow->drawable.pScreen->PaintWindowBorder)(pWindow, &exposed, PW_BORDER); + miPaintWindow(pWindow, &exposed, PW_BORDER); REGION_UNINIT(pScreen, &exposed); } return TRUE; @@ -240,21 +240,6 @@ compUnrealizeWindow (WindowPtr pWin) return ret; } -void -compPaintWindowBackground (WindowPtr pWin, RegionPtr pRegion, int what) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - CompSubwindowsPtr csw = GetCompSubwindows (pWin); - CompScreenPtr cs = GetCompScreen (pScreen); - - if (csw && csw->update == CompositeRedirectManual) - return; - pScreen->PaintWindowBackground = cs->PaintWindowBackground; - (*pScreen->PaintWindowBackground) (pWin, pRegion, what); - cs->PaintWindowBackground = pScreen->PaintWindowBackground; - pScreen->PaintWindowBackground = compPaintWindowBackground; -} - /* * Called after the borderClip for the window has settled down * We use this to make sure our extra borderClip has the right origin |