Commit cff0043a authored by Keith Packard's avatar Keith Packard

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
parent 196aafb1
......@@ -253,9 +253,6 @@ compAddAlternateVisuals (ScreenPtr pScreen, CompScreenPtr cs)
visual->offsetRed = pPictFormat->direct.red;
visual->offsetGreen = pPictFormat->direct.green;
visual->offsetBlue = pPictFormat->direct.blue;
visual->alphaMask = (((unsigned long) pPictFormat->direct.alphaMask) <<
pPictFormat->direct.alpha);
visual->offsetAlpha = pPictFormat->direct.alpha;
/*
* follow GLX and set nplanes to just the bits
* used for the RGB value, not A
......
/* $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);
......
......@@ -75,10 +75,6 @@ typedef struct _Visual {
* it may have more or fewer */
unsigned long redMask, greenMask, blueMask;
int offsetRed, offsetGreen, offsetBlue;
#ifdef COMPOSITE
unsigned long alphaMask;
int offsetAlpha;
#endif
} VisualRec;
typedef struct _Depth {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment