/* Drop icons on removed atlases */
if (removed_atlases->len > 0)
{
+ guint dropped = 0;
+
g_hash_table_iter_init (&iter, self->icons);
while (g_hash_table_iter_next (&iter, (gpointer *)&texture, (gpointer *)&icon_data))
{
if (g_ptr_array_find (removed_atlases, icon_data->atlas, NULL))
- g_hash_table_iter_remove (&iter);
+ {
+ g_hash_table_iter_remove (&iter);
+ dropped++;
+ }
}
+
+ GSK_NOTE(GLYPH_CACHE, if (dropped > 0) g_message ("Dropped %d icons", dropped));
}
if (self->timestamp % MAX_FRAME_AGE == 0)
icon_data->accessed = FALSE;
}
+
+ GSK_NOTE(GLYPH_CACHE, g_message ("%d icons cached", g_hash_table_size (self->icons)));
}
}
{
GSK_NOTE(GLYPH_CACHE,
g_message ("Dropping atlas %d (%g.2%% old)", i,
- gsk_gl_texture_atlas_get_unused_ratio (atlas)));
+ 100.0 * gsk_gl_texture_atlas_get_unused_ratio (atlas)));
if (atlas->texture_id != 0)
{
}
}
+ GSK_NOTE(GLYPH_CACHE, if (removed->len > 0) g_message ("%d atlases left", self->atlases->len));
+
#if 0
{
static guint timestamp;