clutter/stage-cogl: Use default frame rate instead of hardcoded 60Hz

Instead of 0Hz falling back to 60Hz, use `CLUTTER_DEFAULT_FPS` which is
also 60Hz by default.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/363
This commit is contained in:
Daniel van Vugt 2019-04-02 16:55:47 +08:00
parent ccf27e5f83
commit a76762a05e

View File

@ -198,8 +198,8 @@ clutter_stage_cogl_schedule_update (ClutterStageWindow *stage_window,
}
refresh_rate = stage_cogl->refresh_rate;
if (refresh_rate == 0.0)
refresh_rate = 60.0;
if (refresh_rate <= 0.0)
refresh_rate = clutter_get_default_frame_rate ();
refresh_interval = (gint64) (0.5 + G_USEC_PER_SEC / refresh_rate);
if (refresh_interval == 0)