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
This commit is contained in:
parent
196aafb19a
commit
cff0043a34
|
@ -253,9 +253,6 @@ compAddAlternateVisuals (ScreenPtr pScreen, CompScreenPtr cs)
|
||||||
visual->offsetRed = pPictFormat->direct.red;
|
visual->offsetRed = pPictFormat->direct.red;
|
||||||
visual->offsetGreen = pPictFormat->direct.green;
|
visual->offsetGreen = pPictFormat->direct.green;
|
||||||
visual->offsetBlue = pPictFormat->direct.blue;
|
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
|
* follow GLX and set nplanes to just the bits
|
||||||
* used for the RGB value, not A
|
* used for the RGB value, not A
|
||||||
|
|
|
@ -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 $ */
|
/* $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 NUMRED(vis) ((vis->redMask >> vis->offsetRed) + 1)
|
||||||
#define NUMGREEN(vis) ((vis->greenMask >> vis->offsetGreen) + 1)
|
#define NUMGREEN(vis) ((vis->greenMask >> vis->offsetGreen) + 1)
|
||||||
#define NUMBLUE(vis) ((vis->blueMask >> vis->offsetBlue) + 1)
|
#define NUMBLUE(vis) ((vis->blueMask >> vis->offsetBlue) + 1)
|
||||||
#ifdef COMPOSITE
|
#if 0
|
||||||
#define NUMALPHA(vis) ((vis->alphaMask >> vis->offsetAlpha) + 1)
|
#define NUMALPHA(vis) XXX cant store in visual because of ABI concerns
|
||||||
#define ALPHAMASK(vis) (vis->alphaMask)
|
#define ALPHAMASK(vis) XXX cant store in visual because of ABI concerns
|
||||||
#else
|
#else
|
||||||
#define NUMALPHA(vis) 0
|
#define NUMALPHA(vis) 0
|
||||||
#define ALPHAMASK(vis) 0
|
#define ALPHAMASK(vis) 0
|
||||||
|
@ -874,9 +874,9 @@ AllocColor (pmap, pred, pgreen, pblue, pPix, client)
|
||||||
*pPix = (pixR << pVisual->offsetRed) |
|
*pPix = (pixR << pVisual->offsetRed) |
|
||||||
(pixG << pVisual->offsetGreen) |
|
(pixG << pVisual->offsetGreen) |
|
||||||
(pixB << pVisual->offsetBlue);
|
(pixB << pVisual->offsetBlue);
|
||||||
#ifdef COMPOSITE
|
|
||||||
*pPix |= pVisual->alphaMask;
|
*pPix |= ALPHAMASK(pVisual);
|
||||||
#endif
|
|
||||||
*pred = pmap->red[pixR].co.local.red;
|
*pred = pmap->red[pixR].co.local.red;
|
||||||
*pgreen = pmap->green[pixG].co.local.green;
|
*pgreen = pmap->green[pixG].co.local.green;
|
||||||
*pblue = pmap->blue[pixB].co.local.blue;
|
*pblue = pmap->blue[pixB].co.local.blue;
|
||||||
|
@ -967,9 +967,9 @@ AllocColor (pmap, pred, pgreen, pblue, pPix, client)
|
||||||
return (BadAlloc);
|
return (BadAlloc);
|
||||||
}
|
}
|
||||||
*pPix = pixR | pixG | pixB;
|
*pPix = pixR | pixG | pixB;
|
||||||
#ifdef COMPOSITE
|
|
||||||
*pPix |= pVisual->alphaMask;
|
*pPix |= ALPHAMASK(pVisual);
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1942,10 +1942,10 @@ AllocDirect (client, pmap, c, r, g, b, contig, pixels, prmask, pgmask, pbmask)
|
||||||
}
|
}
|
||||||
pmap->numPixelsBlue[client] += npixB;
|
pmap->numPixelsBlue[client] += npixB;
|
||||||
pmap->freeBlue -= npixB;
|
pmap->freeBlue -= npixB;
|
||||||
#ifdef COMPOSITE
|
|
||||||
|
|
||||||
for (pDst = pixels; pDst < pixels + c; pDst++)
|
for (pDst = pixels; pDst < pixels + c; pDst++)
|
||||||
*pDst |= pmap->pVisual->alphaMask;
|
*pDst |= ALPHAMASK(pmap->pVisual);
|
||||||
#endif
|
|
||||||
|
|
||||||
DEALLOCATE_LOCAL(ppixBlue);
|
DEALLOCATE_LOCAL(ppixBlue);
|
||||||
DEALLOCATE_LOCAL(ppixGreen);
|
DEALLOCATE_LOCAL(ppixGreen);
|
||||||
|
|
|
@ -75,10 +75,6 @@ typedef struct _Visual {
|
||||||
* it may have more or fewer */
|
* it may have more or fewer */
|
||||||
unsigned long redMask, greenMask, blueMask;
|
unsigned long redMask, greenMask, blueMask;
|
||||||
int offsetRed, offsetGreen, offsetBlue;
|
int offsetRed, offsetGreen, offsetBlue;
|
||||||
#ifdef COMPOSITE
|
|
||||||
unsigned long alphaMask;
|
|
||||||
int offsetAlpha;
|
|
||||||
#endif
|
|
||||||
} VisualRec;
|
} VisualRec;
|
||||||
|
|
||||||
typedef struct _Depth {
|
typedef struct _Depth {
|
||||||
|
|
Loading…
Reference in New Issue