diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-25 19:29:01 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-25 19:29:01 +0000 |
commit | adc7f9a4ebdfe11d4cd6de9388b63dfe36450b39 (patch) | |
tree | 23eb7becc5360b2cbe16aa8d45529880067f3989 /hw/xfree86/xaa/xaaPCache.c | |
parent | 90f1536dd315cd265bfc7ef35058761a65a01734 (diff) |
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_16
Diffstat (limited to 'hw/xfree86/xaa/xaaPCache.c')
-rw-r--r-- | hw/xfree86/xaa/xaaPCache.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/hw/xfree86/xaa/xaaPCache.c b/hw/xfree86/xaa/xaaPCache.c index e6163b33a..c7756ba93 100644 --- a/hw/xfree86/xaa/xaaPCache.c +++ b/hw/xfree86/xaa/xaaPCache.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c,v 1.30 2000/09/25 23:56:14 mvojkovi Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/xaa/xaaPCache.c,v 1.33 2003/11/03 05:11:54 tsi Exp $ */ #include "misc.h" #include "xf86.h" @@ -321,13 +321,11 @@ ConvertAllPartialsTo8x8( Bool DoMono = (infoRec->PixmapCacheFlags & CACHE_MONO_8x8); CacheLinkPtr pLink = ListPartial; CacheLinkPtr MonoList = *ListMono, ColorList = *ListColor; - int MonosPerColor = 1; if(DoColor && DoMono) { /* we assume color patterns take more space than color ones */ if(MonoH > ColorH) ColorH = MonoH; if(MonoW > ColorW) ColorW = MonoW; - MonosPerColor = (ColorH/MonoH) * (ColorW/MonoW); } /* Break up the area into as many Color and Mono slots as we can */ @@ -763,6 +761,7 @@ XAAInitPixmapCache( 1) Don't take up more than half the memory. 2) Don't bother if you can't get at least four. 3) Don't make more than MAX_512. + 4) Don't have any of there are no 256x256s. 256x256 - 1) Don't take up more than a quarter of the memory enless there @@ -786,6 +785,13 @@ XAAInitPixmapCache( else Target256 = ntotal >> 4; if(Target256 < 4) Target256 = 0; + if(Num512 && Num256 < 4) { + while(Num512 && Num256 < Target256) { + SubdivideList(&List512, &List256); + Num256 += 4; Num512--; + } + } + if(!Num512) { /* no room */ } else if((Num512 < 4) || (!Target512)) { while(Num512) { @@ -2044,7 +2050,7 @@ XAAWriteColor8x8PatternToCache( nw = w; memcpy(dstPtr, srcPtr, w * Bpp); while (nw != 8) { - memcpy(dstPtr + (nw * Bpp), srcPtr, nw * Bpp); + memcpy(dstPtr + (nw * Bpp), dstPtr, nw * Bpp); nw <<= 1; } } |