From 5775731b6489c63212914163f51b7a576df70658 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 12 Aug 2013 22:24:47 +0100 Subject: sna/glyphs: Do not attempt to release the negative cache lookup Following commit 021c59f6243c51871f664e5fdd43aa00a809033a Author: Chris Wilson Date: Sat Aug 10 13:15:48 2013 +0000 sna/glyphs: Micro-optimise glyph drawing we need to be careful during sna_glyph_release() that the atlas points into the glyph cache before releasing it. Fortunately caught by an assertion. Reported-by: Jiri Slaby Signed-off-by: Chris Wilson --- src/sna/sna_glyphs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c index 29c3f560..b34f3887 100644 --- a/src/sna/sna_glyphs.c +++ b/src/sna/sna_glyphs.c @@ -2217,7 +2217,7 @@ sna_glyph_unrealize(ScreenPtr screen, GlyphPtr glyph) p->image = NULL; } - if (p->atlas) { + if (p->atlas && p->atlas != GetGlyphPicture(glyph, screen)) { struct sna *sna = to_sna_from_screen(screen); struct sna_glyph_cache *cache = &sna->render.glyph[p->pos&1]; DBG(("%s: releasing glyph pos %d from cache %d\n", -- cgit v1.2.3