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 /cfb/cfballpriv.c | |
parent | 6da39c67905500ab2db00a45cda4a9f756cdde96 (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 'cfb/cfballpriv.c')
-rw-r--r-- | cfb/cfballpriv.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/cfb/cfballpriv.c b/cfb/cfballpriv.c index e0ccdf4d0..858ff6061 100644 --- a/cfb/cfballpriv.c +++ b/cfb/cfballpriv.c @@ -45,7 +45,6 @@ in this Software without prior written authorization from The Open Group. #include "mibstore.h" #if 1 || PSZ==8 -int cfbWindowPrivateIndex = -1; int cfbGCPrivateIndex = -1; #endif #ifdef CFB_NEED_SCREEN_PRIVATE @@ -55,29 +54,20 @@ static unsigned long cfbGeneration = 0; Bool -cfbAllocatePrivates(pScreen, window_index, gc_index) - ScreenPtr pScreen; - int *window_index, *gc_index; +cfbAllocatePrivates(ScreenPtr pScreen, int *gc_index) { - if (!window_index || !gc_index || - (*window_index == -1 && *gc_index == -1)) + if (!gc_index || *gc_index == -1) { - if (!mfbAllocatePrivates(pScreen, - &cfbWindowPrivateIndex, &cfbGCPrivateIndex)) + if (!mfbAllocatePrivates(pScreen, &cfbGCPrivateIndex)) return FALSE; - if (window_index) - *window_index = cfbWindowPrivateIndex; if (gc_index) *gc_index = cfbGCPrivateIndex; } else { - cfbWindowPrivateIndex = *window_index; cfbGCPrivateIndex = *gc_index; } - if (!AllocateWindowPrivate(pScreen, cfbWindowPrivateIndex, - sizeof(cfbPrivWin)) || - !AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC))) + if (!AllocateGCPrivate(pScreen, cfbGCPrivateIndex, sizeof(cfbPrivGC))) return FALSE; #ifdef CFB_NEED_SCREEN_PRIVATE if (cfbGeneration != serverGeneration) |