diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-02-27 16:41:39 +0100 |
---|---|---|
committer | Michel Dänzer <daenzer@vmware.com> | 2009-02-27 16:41:39 +0100 |
commit | 265d20068af5434489752b6dba0bf0065b3cc3ec (patch) | |
tree | ac22e4e064eafb95fe7410b699bd591c2e027fef /exa/exa_glyphs.c | |
parent | 9d5141f7bcfed36417873b47f850332506af83ac (diff) |
EXA: Fix check for whether the glyph we're evicting from the cache is in use.
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 <daenzer@vmware.com>
Diffstat (limited to 'exa/exa_glyphs.c')
-rw-r--r-- | exa/exa_glyphs.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |