EXA: Declare glyph cache picture as component-alpha when necessary.
Without this, rendering component-alpha glyphs may break without a mask. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=19233 .
This commit is contained in:
parent
f4e00b783d
commit
639f289dcd
|
@ -140,6 +140,8 @@ exaUnrealizeGlyphCaches(ScreenPtr pScreen,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
|
||||||
|
|
||||||
/* All caches for a single format share a single pixmap for glyph storage,
|
/* All caches for a single format share a single pixmap for glyph storage,
|
||||||
* allowing mixing glyphs of different sizes without paying a penalty
|
* allowing mixing glyphs of different sizes without paying a penalty
|
||||||
* for switching between source pixmaps. (Note that for a size of font
|
* for switching between source pixmaps. (Note that for a size of font
|
||||||
|
@ -159,6 +161,7 @@ exaRealizeGlyphCaches(ScreenPtr pScreen,
|
||||||
PictFormatPtr pPictFormat;
|
PictFormatPtr pPictFormat;
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
PicturePtr pPicture;
|
PicturePtr pPicture;
|
||||||
|
CARD32 component_alpha;
|
||||||
int height;
|
int height;
|
||||||
int i;
|
int i;
|
||||||
int error;
|
int error;
|
||||||
|
@ -191,8 +194,10 @@ exaRealizeGlyphCaches(ScreenPtr pScreen,
|
||||||
if (!pPixmap)
|
if (!pPixmap)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
component_alpha = NeedsComponent(pPictFormat->format);
|
||||||
pPicture = CreatePicture(0, &pPixmap->drawable, pPictFormat,
|
pPicture = CreatePicture(0, &pPixmap->drawable, pPictFormat,
|
||||||
0, 0, serverClient, &error);
|
CPComponentAlpha, &component_alpha, serverClient,
|
||||||
|
&error);
|
||||||
|
|
||||||
(*pScreen->DestroyPixmap) (pPixmap); /* picture holds a refcount */
|
(*pScreen->DestroyPixmap) (pPixmap); /* picture holds a refcount */
|
||||||
|
|
||||||
|
@ -741,8 +746,6 @@ exaGlyphsIntersect(int nlist, GlyphListPtr list, GlyphPtr *glyphs)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
|
|
||||||
|
|
||||||
void
|
void
|
||||||
exaGlyphs (CARD8 op,
|
exaGlyphs (CARD8 op,
|
||||||
PicturePtr pSrc,
|
PicturePtr pSrc,
|
||||||
|
|
Loading…
Reference in New Issue