From: Matthias Clasen Date: Sat, 12 Oct 2019 16:33:43 +0000 (-0400) Subject: gl: Interleave cache aging X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~20^2~717 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=88649b6aae5fd29a9e686f6195667193a27f223e;p=gtk4.git 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. --- 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))