gl: Don't leak big glyphs

We were never resetting the accessed bit of
glyphs that are big enough to be stored individually,
so these would just accumulate and never be dropped.
This commit is contained in:
Matthias Clasen 2022-04-03 20:25:22 -04:00
parent 494de142f6
commit af20f7e9b5

View File

@ -108,12 +108,18 @@ gsk_gl_texture_library_real_compact (GskGLTextureLibrary *self,
atlased++; atlased++;
} }
} }
else if (!entry->accessed) else
{
if (!entry->accessed)
{ {
gsk_gl_driver_release_texture (self->driver, entry->texture); gsk_gl_driver_release_texture (self->driver, entry->texture);
g_hash_table_iter_remove (&iter); g_hash_table_iter_remove (&iter);
dropped++; dropped++;
} }
if (periodic_scan)
entry->accessed = FALSE;
}
} }
GSK_NOTE (GLYPH_CACHE, g_message ("%s: Dropped %d individual items", GSK_NOTE (GLYPH_CACHE, g_message ("%s: Dropped %d individual items",