summaryrefslogtreecommitdiff
authorMichel Dänzer <daenzer@vmware.com>2009-01-13 12:05:32 (GMT)
committer Michel Dänzer <daenzer@vmware.com>2009-01-13 12:05:32 (GMT)
commit639f289dcdbe00a516820f573c01a8339e120ed4 (patch) (side-by-side diff)
tree8c41776c97a4a08709ce2f4da1dd6882046c8bbf
parentf4e00b783d3f824058a5f140e6462142688f5116 (diff)
downloadxserver-639f289dcdbe00a516820f573c01a8339e120ed4.zip
xserver-639f289dcdbe00a516820f573c01a8339e120ed4.tar.gz
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 .
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--exa/exa_glyphs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c
index 169763f..688081d 100644
--- a/exa/exa_glyphs.c
+++ b/exa/exa_glyphs.c
@@ -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,
* allowing mixing glyphs of different sizes without paying a penalty
* for switching between source pixmaps. (Note that for a size of font
@@ -159,6 +161,7 @@ exaRealizeGlyphCaches(ScreenPtr pScreen,
PictFormatPtr pPictFormat;
PixmapPtr pPixmap;
PicturePtr pPicture;
+ CARD32 component_alpha;
int height;
int i;
int error;
@@ -191,8 +194,10 @@ exaRealizeGlyphCaches(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 */
@@ -741,8 +746,6 @@ 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,