[gtk/glyphcache-fiddling: 10/11] gl: Interleave cache aging



commit 88649b6aae5fd29a9e686f6195667193a27f223e
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Oct 12 12:33:43 2019 -0400

    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))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]