diff options
author | Keith Packard <keithp@keithp.com> | 2004-08-07 00:58:21 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2004-08-07 00:58:21 +0000 |
commit | cff0043a347ba06e8ab16a84a35c99794b45149b (patch) | |
tree | ef98083e4671a7f209f3285556d37f221ec02ba4 /dix | |
parent | 196aafb19a3cfdc8c21f9bf75814cf0d84ff4446 (diff) |
Remove alpha-related fields from visual structure to retain binary
compatibilty. Applications using ARGB visuals will need to use Render
or other mechanisms to compute pixel values instead of AllocColor
Diffstat (limited to 'dix')
-rw-r--r-- | dix/colormap.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/dix/colormap.c b/dix/colormap.c index 8ea87674c..a0c6b8056 100644 --- a/dix/colormap.c +++ b/dix/colormap.c @@ -1,4 +1,4 @@ -/* $XdotOrg: xc/programs/Xserver/dix/colormap.c,v 1.2.2.1 2004/07/30 06:54:41 anholt Exp $ */ +/* $XdotOrg: xc/programs/Xserver/dix/colormap.c,v 1.3 2004/07/31 08:24:13 anholt Exp $ */ /* $XFree86: xc/programs/Xserver/dix/colormap.c,v 3.11 2003/11/03 05:10:59 tsi Exp $ */ /*********************************************************** @@ -190,9 +190,9 @@ static void FindColorInRootCmap ( #define NUMRED(vis) ((vis->redMask >> vis->offsetRed) + 1) #define NUMGREEN(vis) ((vis->greenMask >> vis->offsetGreen) + 1) #define NUMBLUE(vis) ((vis->blueMask >> vis->offsetBlue) + 1) -#ifdef COMPOSITE -#define NUMALPHA(vis) ((vis->alphaMask >> vis->offsetAlpha) + 1) -#define ALPHAMASK(vis) (vis->alphaMask) +#if 0 +#define NUMALPHA(vis) XXX cant store in visual because of ABI concerns +#define ALPHAMASK(vis) XXX cant store in visual because of ABI concerns #else #define NUMALPHA(vis) 0 #define ALPHAMASK(vis) 0 @@ -874,9 +874,9 @@ AllocColor (pmap, pred, pgreen, pblue, pPix, client) *pPix = (pixR << pVisual->offsetRed) | (pixG << pVisual->offsetGreen) | (pixB << pVisual->offsetBlue); -#ifdef COMPOSITE - *pPix |= pVisual->alphaMask; -#endif + + *pPix |= ALPHAMASK(pVisual); + *pred = pmap->red[pixR].co.local.red; *pgreen = pmap->green[pixG].co.local.green; *pblue = pmap->blue[pixB].co.local.blue; @@ -967,9 +967,9 @@ AllocColor (pmap, pred, pgreen, pblue, pPix, client) return (BadAlloc); } *pPix = pixR | pixG | pixB; -#ifdef COMPOSITE - *pPix |= pVisual->alphaMask; -#endif + + *pPix |= ALPHAMASK(pVisual); + break; } @@ -1942,10 +1942,10 @@ AllocDirect (client, pmap, c, r, g, b, contig, pixels, prmask, pgmask, pbmask) } pmap->numPixelsBlue[client] += npixB; pmap->freeBlue -= npixB; -#ifdef COMPOSITE + + for (pDst = pixels; pDst < pixels + c; pDst++) - *pDst |= pmap->pVisual->alphaMask; -#endif + *pDst |= ALPHAMASK(pmap->pVisual); DEALLOCATE_LOCAL(ppixBlue); DEALLOCATE_LOCAL(ppixGreen); |