Dave Airlie <[email protected]> writes:

>> +    GlyphHashPtr hash = &glyphSet->hash;
>> +    GlyphRefPtr gr = &hash->table[id % hash->hashSet->size];
>
> I'm not sure if I'm right,
>
> but should this check gr == DeletedGlyph?

I think you probably mean:

        gr->glyph == DeletedGlyph && gr->glyph != NULL

Yes, that might well resolve my 'missing glyphs' problem with a
long-running firefox instance, which may well be doing some glyph
deleting in response to memory pressure.

I think this is a better fix though, and takes advantage of 0 being an
undefined glyph, by simply resetting the signature value to zero when
deleting a glyph:

diff --git a/render/glyph.c b/render/glyph.c
index 4a4f11b..86ec7aa 100644
--- a/render/glyph.c
+++ b/render/glyph.c
@@ -322,6 +322,7 @@ DeleteGlyph(GlyphSetPtr glyphSet, Glyph id)
     glyph = gr->glyph;
     if (glyph && glyph != DeletedGlyph) {
         gr->glyph = DeletedGlyph;
+        gr->signature = 0;
         glyphSet->hash.tableEntries--;
         FreeGlyph(glyph, glyphSet->fdepth);
         return TRUE;

-- 
-keith

Attachment: signature.asc
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to