diff options
Diffstat (limited to 'exa/exa_glyphs.c')
-rw-r--r-- | exa/exa_glyphs.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c index 169763f76..688081dde 100644 --- a/exa/exa_glyphs.c +++ b/exa/exa_glyphs.c @@ -137,12 +137,14 @@ exaUnrealizeGlyphCaches(ScreenPtr pScreen, cache->glyphs = NULL; } cache->glyphCount = 0; } } +#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, * allowing mixing glyphs of different sizes without paying a penalty * for switching between source pixmaps. (Note that for a size of font * right at the border between two sizes, we might be switching for almost * every glyph.) * @@ -156,12 +158,13 @@ exaRealizeGlyphCaches(ScreenPtr pScreen, ExaScreenPriv(pScreen); int depth = PIXMAN_FORMAT_DEPTH(format); PictFormatPtr pPictFormat; PixmapPtr pPixmap; PicturePtr pPicture; + CARD32 component_alpha; int height; int i; int error; pPictFormat = PictureMatchFormat(pScreen, depth, format); if (!pPictFormat) @@ -188,14 +191,16 @@ exaRealizeGlyphCaches(ScreenPtr pScreen, pPixmap = (*pScreen->CreatePixmap) (pScreen, CACHE_PICTURE_WIDTH, height, depth, 0); if (!pPixmap) return FALSE; + component_alpha = NeedsComponent(pPictFormat->format); pPicture = CreatePicture(0, &pPixmap->drawable, pPictFormat, - 0, 0, serverClient, &error); + CPComponentAlpha, &component_alpha, serverClient, + &error); (*pScreen->DestroyPixmap) (pPixmap); /* picture holds a refcount */ if (!pPicture) return FALSE; @@ -738,14 +743,12 @@ exaGlyphsIntersect(int nlist, GlyphListPtr list, GlyphPtr *glyphs) } } return FALSE; } -#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0) - void exaGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, |