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,11 +108,17 @@ gsk_gl_texture_library_real_compact (GskGLTextureLibrary *self,
atlased++;
}
}
else if (!entry->accessed)
else
{
gsk_gl_driver_release_texture (self->driver, entry->texture);
g_hash_table_iter_remove (&iter);
dropped++;
if (!entry->accessed)
{
gsk_gl_driver_release_texture (self->driver, entry->texture);
g_hash_table_iter_remove (&iter);
dropped++;
}
if (periodic_scan)
entry->accessed = FALSE;
}
}