diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-04 08:51:17 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-04 09:56:44 +0000 |
commit | c6a21f0355447d398a8b857ad046cd27141d4744 (patch) | |
tree | 8b942b93a0cbf96a8db32b09d372ecbd32b21c92 | |
parent | 1cbc59a917e7352fc68aa0e26b1575cbd0ceab0d (diff) |
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@maven.pl>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74494
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Arkadiusz Miskiewicz <arekm@maven.pl>
-rw-r--r-- | src/sna/sna_glyphs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c index d06d52a9..c72c5e5d 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, |