summaryrefslogtreecommitdiff
path: root/gdk/quartz/GdkQuartzNSWindow.h
diff options
context:
space:
mode:
authorYariv Barkan <21448-yarivb@users.noreply.gitlab.gnome.org>2020-06-10 10:45:14 +0300
committerAlexander Larsson <alexl@redhat.com>2020-06-15 08:54:17 +0200
commit9c5d6eaa718ab37f91fb847a3e33dd8a91e3c1c9 (patch)
treea65a5cd164fe0871d4cf85ba64ef58aefda4f3e2 /gdk/quartz/GdkQuartzNSWindow.h
parentc49318e973bab3091bf146af058a0f1b42b6effd (diff)
downloadgtk+-9c5d6eaa718ab37f91fb847a3e33dd8a91e3c1c9.tar.gz
frame clock: adjust reported frame time
When an animation is started while the application is idle, that often happens as a result of some external event. This can be an input event, an expired timer, data arriving over the network etc. The result is that the first animation clock cycle could be scheduled at some random time, as opposed to follow up cycles which are usually scheduled right after a vsync. Since the frame time we report to the application is correlated to the time when the frame clock was scheduled to run, this can result in uneven times reported in the first few animation frames. In order to fix that, we measure the phase of the first clock cycle - i.e. the offset between the first cycle and the preceding vsync. Once we start receiving "frame drawn" signals, the cadence of the frame clock scheduling becomes tied to the vsync. In order to maintain the regularity of the reported frame times, we adjust subsequent reported frame times with the aforementioned phase.
Diffstat (limited to 'gdk/quartz/GdkQuartzNSWindow.h')
0 files changed, 0 insertions, 0 deletions