summaryrefslogtreecommitdiff
path: root/src/sna/sna_glyphs.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-08-12 22:24:47 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-08-12 22:24:47 +0100
commit5775731b6489c63212914163f51b7a576df70658 (patch)
tree5039ed3c84914faa6f160df40da4dea70aa501f7 /src/sna/sna_glyphs.c
parent8da8c88e999d74fb110dddd497f03854adc089cc (diff)
sna/glyphs: Do not attempt to release the negative cache lookup
Following commit 021c59f6243c51871f664e5fdd43aa00a809033a Author: Chris Wilson <chris@chris-wilson.co.uk> 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 <jirislaby@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_glyphs.c')
-rw-r--r--src/sna/sna_glyphs.c2
1 files changed, 1 insertions, 1 deletions
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",