From 88649b6aae5fd29a9e686f6195667193a27f223e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 12 Oct 2019 12:33:43 -0400 Subject: [PATCH] gl: Interleave cache aging Every few frames, we do extra work for the cache aging. Arrange for the glyph and icon caches to not cause extra work on the same frame, to smooth things out. --- gsk/gl/gskglglyphcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gsk/gl/gskglglyphcache.c b/gsk/gl/gskglglyphcache.c index ee34e611c0..33ef45279e 100644 --- a/gsk/gl/gskglglyphcache.c +++ b/gsk/gl/gskglglyphcache.c @@ -341,7 +341,7 @@ gsk_gl_glyph_cache_begin_frame (GskGLGlyphCache *self, GSK_NOTE(GLYPH_CACHE, if (dropped > 0) g_message ("Dropped %d glyphs", dropped)); } - if (self->timestamp % MAX_FRAME_AGE == 0) + if (self->timestamp % MAX_FRAME_AGE == 30) { g_hash_table_iter_init (&iter, self->hash_table); while (g_hash_table_iter_next (&iter, (gpointer *)&key, (gpointer *)&value)) -- 2.30.2