• Daniel van Vugt's avatar
    Fix irregular gdk_frame_clock_get_frame_time · c6901a8b
    Daniel van Vugt authored
    This fixes stuttering in animations that rely on the regularity of
    gdk_frame_clock_get_frame_time.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=787665
    
    BEFORE
    gdkgears:
    58 FPS and visibly stuttering
    gnome-maps on a 59.95Hz monitor:
    "paint" g_get_monotonic_time +17278μs, gdk_frame_clock_get_frame_time +17278μs
    "paint" g_get_monotonic_time +17449μs, gdk_frame_clock_get_frame_time +17426μs
    "paint" g_get_monotonic_time +17620μs, gdk_frame_clock_get_frame_time +17600μs
    
    AFTER
    gdkgears:
    60 FPS and smoother
    gnome-maps on a 59.95Hz monitor:
    "paint" g_get_monotonic_time +18228μs, gdk_frame_clock_get_frame_time +16680μs
    "paint" g_get_monotonic_time +15010μs, gdk_frame_clock_get_frame_time +16680μs
    "paint" g_get_monotonic_time +17134μs, gdk_frame_clock_get_frame_time +16680μs
    c6901a8b
gdkframeclockidle.c 19.4 KB