mutter/clutter
Daniel van Vugt 35aa278194
clutter/stage-cogl: Stop schedule_update repeatedly returning now
That could happen if the backend did not provide presentation timestamps,
or if the screen was not changing other than the hardware cursor:

  if (stage_cogl->last_presentation_time == 0||
      stage_cogl->last_presentation_time < now - 150000)
    {
      stage_cogl->update_time = now;
      return;
    }

By setting `update_time` to `now`, master_clock_get_swap_wait_time()
returns 0:

  gint64 now = g_source_get_time (master_clock->source);
  if (min_update_time < now)
    {
      return 0;
    }
  else
    {
      gint64 delay_us = min_update_time - now;
      return (delay_us + 999) / 1000;
    }

However, zero is a value unsupported by the default master clock
due to:

  if (swap_delay != 0)
    return swap_delay;

All cases are now handled by extrapolating when the next presentation
time would be and calculating an appropriate update time to meet that.

We also need to add a check for `update_time == last_update_time`, which
is a situation that just became possible since we support old (or zero)
values of `last_presentation_time`. This avoids getting more than one
stage update per frame interval when input events arrive without
triggering a stage redraw (e.g. moving the hardware cursor).

https://gitlab.gnome.org/GNOME/mutter/merge_requests/363
2019-06-07 12:03:35 -03:00
..
clutter clutter/stage-cogl: Stop schedule_update repeatedly returning now 2019-06-07 12:03:35 -03:00
tests clutter/tests/actor-destroy: Check destroying the actor clears the children 2019-05-27 17:14:25 -05:00
.gitignore clutter: Remove clutter specific version 2018-11-06 17:17:36 +01:00
meson.build meson: Add no-omit-frame-pointer to clutter debug builds 2019-05-31 16:03:43 +00:00