From 748588f5bfe082f4f134b96a5e02cc90ef33864e Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 4 Feb 2014 08:51:17 +0000 Subject: [PATCH] clear-composite-state-after-flushing-glyphs --- src/sna/sna_glyphs.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c index d06d52a..88becf1 100644 --- a/src/sna/sna_glyphs.c +++ b/src/sna/sna_glyphs.c @@ -601,6 +601,7 @@ glyphs_to_dst(struct sna *sna, if (glyph_atlas) { tmp.done(sna, &tmp); + memset(&tmp, 0, sizeof(tmp)); glyph_atlas = NULL; } if (!glyph_cache(screen, &sna->render, glyph)) { @@ -615,8 +616,10 @@ glyphs_to_dst(struct sna *sna, } if (p->atlas != glyph_atlas) { - if (glyph_atlas) + if (glyph_atlas) { tmp.done(sna, &tmp); + memset(&tmp, 0, sizeof(tmp)); + } if (!sna->render.composite(sna, op, src, p->atlas, dst, @@ -764,6 +767,7 @@ glyphs0_to_dst(struct sna *sna, if (glyph_atlas) { tmp.done(sna, &tmp); + memset(&tmp, 0, sizeof(tmp)); glyph_atlas = NULL; } if (!glyph_cache(screen, &sna->render, glyph)) { @@ -778,8 +782,10 @@ glyphs0_to_dst(struct sna *sna, } if (p->atlas != glyph_atlas) { - if (glyph_atlas) + if (glyph_atlas) { tmp.done(sna, &tmp); + memset(&tmp, 0, sizeof(tmp)); + } if (!sna->render.composite(sna, op, src, p->atlas, dst, @@ -1324,6 +1330,7 @@ next_image: if (glyph_atlas) { tmp.done(sna, &tmp); + memset(&tmp, 0, sizeof(tmp)); glyph_atlas = NULL; } if (!glyph_cache(screen, &sna->render, glyph)) { @@ -1339,8 +1346,10 @@ next_image: if (p->atlas != glyph_atlas) { bool ok; - if (glyph_atlas) + if (glyph_atlas) { tmp.done(sna, &tmp); + memset(&tmp, 0, sizeof(tmp)); + } DBG(("%s: atlas format=%08x, mask format=%08x\n", __FUNCTION__, -- 1.7.9.5