Commit 8ef8169d authored by Daniel van Vugt's avatar Daniel van Vugt

master-clock: Check for CLUTTER_FEATURE_SWAP_EVENTS

Because the absence of `CLUTTER_FEATURE_SYNC_TO_VBLANK` alone isn't
reason to drop down to the 60Hz fallback.

The very previous comment already states "or swap-buffer-complete
events if supported in the backend". And the code immediately above
that actually does the syncing to swap events via

So if we have `CLUTTER_FEATURE_SWAP_EVENTS` but not
`CLUTTER_FEATURE_SYNC_TO_VBLANK` then we still want to return
immediately, avoiding getting rate limited to 60Hz.
parent a6c0652a
......@@ -298,10 +298,11 @@ master_clock_next_frame_delay (ClutterMasterClockDefault *master_clock)
* (NB: if there aren't even any timelines running then the master clock will
* be completely stopped in master_clock_is_running())
if (clutter_feature_available (CLUTTER_FEATURE_SYNC_TO_VBLANK) &&
if ((clutter_feature_available (CLUTTER_FEATURE_SYNC_TO_VBLANK) ||
clutter_feature_available (CLUTTER_FEATURE_SWAP_EVENTS)) &&
CLUTTER_NOTE (SCHEDULER, "vblank available and updated stages");
CLUTTER_NOTE (SCHEDULER, "throttling available and updated stages");
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment