From 265d20068af5434489752b6dba0bf0065b3cc3ec Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Fri, 27 Feb 2009 16:41:39 +0100 Subject: EXA: Fix check for whether the glyph we're evicting from the cache is in use. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since commit f07f18231a921d3ae9dd9b75881c9e58e9e2e235 ('EXA: Allow using exaCompositeRects also when we can't use a mask in exaGlyphs.') we were checking the wrong set of coordinates in the buffer where glyphs to be rendered are accumulated when no mask is used in exaGlyphs. This fixes occasional glyph corruption which can be corrected with redraws, in particular with Qt4. Thanks to Maarten Maathuis for asking the right question: 'where do we protect against evicting glyphs that are still needed?' Signed-off-by: Michel Dänzer --- exa/exa_glyphs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'exa/exa_glyphs.c') diff --git a/exa/exa_glyphs.c b/exa/exa_glyphs.c index 918fd8553..d55839c8d 100644 --- a/exa/exa_glyphs.c +++ b/exa/exa_glyphs.c @@ -469,7 +469,9 @@ exaGlyphCacheBufferGlyph(ScreenPtr pScreen, y = CACHE_Y(pos); for (i = 0; i < buffer->count; i++) { - if (buffer->rects[i].xSrc == x && buffer->rects[i].ySrc == y) { + if (pSrc ? + (buffer->rects[i].xMask == x && buffer->rects[i].yMask == y) : + (buffer->rects[i].xSrc == x && buffer->rects[i].ySrc == y)) { DBG_GLYPH_CACHE((" must flush buffer\n")); return ExaGlyphNeedFlush; } -- cgit v1.2.3