xf86-video-intel: src/sna/sna_glyphs.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Feb 4 01:57:04 PST 2014


 src/sna/sna_glyphs.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c6a21f0355447d398a8b857ad046cd27141d4744
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Feb 4 08:51:17 2014 +0000

    sna/glyphs: Reset composite state between switching glyph formats
    
    One path uses the mask channel, the other does not. We cannot rely on
    overwriting all reused state in this case, and so we must clear the
    composite state prior to use each time.
    
    Reported-by: Arkadiusz Miskiewicz <arekm at maven.pl>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74494
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
    Tested-by: Arkadiusz Miskiewicz <arekm at maven.pl>

diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c
index d06d52a..c72c5e5 100644
--- a/src/sna/sna_glyphs.c
+++ b/src/sna/sna_glyphs.c
@@ -1306,7 +1306,6 @@ next_image:
 		if (!clear_pixmap(sna, pixmap))
 			goto err_mask;
 
-		memset(&tmp, 0, sizeof(tmp));
 		glyph_atlas = NULL;
 		do {
 			int n = list->len;
@@ -1346,6 +1345,8 @@ next_image:
 					     __FUNCTION__,
 					     (int)p->atlas->format,
 					     (int)(format->depth << 24 | format->format)));
+
+					memset(&tmp, 0, sizeof(tmp));
 					if (p->atlas->format == (format->depth << 24 | format->format)) {
 						ok = sna->render.composite(sna, PictOpAdd,
 									   p->atlas, NULL, mask,


More information about the xorg-commit mailing list