summaryrefslogtreecommitdiff
path: root/uxa/uxa-glyphs.c
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <bero@arklinux.org>2009-01-13 10:35:19 -0800
committerEric Anholt <eric@anholt.net>2009-01-13 10:37:41 -0800
commitc80f1a9c5131721eaf87d12a7a67e603cdfed63b (patch)
treee141248ac057b9a4136a187f4b3714cf70b24905 /uxa/uxa-glyphs.c
parent3d206f9e46b5237bda7ca3c0f92d64c45ee8bdf5 (diff)
UXA: Declare glyph cache picture as component-alpha when necessary.
Without this, rendering component-alpha glyphs may break without a mask. Bug #19534. Ported from fix by Michel Dänzer <daenzer@vmware.com> in xserver commit 639f289dcdbe00a516820f573c01a8339e120ed4
Diffstat (limited to 'uxa/uxa-glyphs.c')
-rw-r--r--uxa/uxa-glyphs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
index dd26362e..1c06e6d2 100644
--- a/uxa/uxa-glyphs.c
+++ b/uxa/uxa-glyphs.c
@@ -140,6 +140,8 @@ uxa_unrealize_glyph_caches(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,
* allowing mixing glyphs of different sizes without paying a penalty
* for switching between source pixmaps. (Note that for a size of font
@@ -158,6 +160,7 @@ uxa_realize_glyph_caches(ScreenPtr pScreen,
PictFormatPtr pPictFormat;
PixmapPtr pPixmap;
PicturePtr pPicture;
+ CARD32 component_alpha;
int height;
int i;
int error;
@@ -190,8 +193,10 @@ uxa_realize_glyph_caches(ScreenPtr pScreen,
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 */
@@ -729,8 +734,6 @@ uxa_glyphs_intersect(int nlist, GlyphListPtr list, GlyphPtr *glyphs)
return FALSE;
}
-#define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0)
-
void
uxa_glyphs (CARD8 op,
PicturePtr pSrc,