Add support for RENDER BGRA formats.

This commit is contained in:
Michel Dänzer 2009-08-04 23:23:21 +02:00
commit 842373104d
6 changed files with 84 additions and 11 deletions

View file

@ -238,6 +238,7 @@ static CompAlternateVisual altVisuals[] = {
{ 24, PICT_r8g8b8 },
#endif
{ 32, PICT_a8r8g8b8 },
{ 32, PICT_b8g8r8a8 },
};
static const int NUM_COMP_ALTERNATE_VISUALS = sizeof(altVisuals) /
@ -272,7 +273,8 @@ compAddAlternateVisual(ScreenPtr pScreen, CompScreenPtr cs,
return TRUE;
pPictFormat = PictureMatchFormat (pScreen, alt->depth, alt->format);
if (!pPictFormat)
if (!pPictFormat ||
pPictFormat->direct.red != pScreen->visuals[0].offsetRed)
return FALSE;
vid = xalloc(sizeof(VisualID));