After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 693934 - Add gdk_frame_clock_begin/end_updating()
Add gdk_frame_clock_begin/end_updating()
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-02-16 03:32 UTC by Owen Taylor
Modified: 2013-02-18 16:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add gdk_frame_clock_begin/end_updating() (15.18 KB, patch)
2013-02-16 03:32 UTC, Owen Taylor
none Details | Review
win32: Predict presentation time (4.26 KB, patch)
2013-02-18 14:48 UTC, Alexander Larsson
none Details | Review
win32: Request higher precision timers during animations (1.55 KB, patch)
2013-02-18 14:48 UTC, Alexander Larsson
none Details | Review

Description Owen Taylor 2013-02-16 03:32:13 UTC
Add an API to start or stop continually updating the frame clock.
This is a slight convenience for applcations and avoids the problem
of getting one more frame run after an animation stops, but the
primary motivation for this is because it looks like we might have
to use timeBeginPeriod()/timeEndPeriod() on Windows to get reasonably
accurate timing, and for that we'll need to know if there is an
animation running.
Comment 1 Owen Taylor 2013-02-16 03:32:15 UTC
Created attachment 236337 [details] [review]
Add gdk_frame_clock_begin/end_updating()
Comment 2 Alexander Larsson 2013-02-18 14:48:34 UTC
Created attachment 236599 [details] [review]
win32: Predict presentation time

This just copies what X11 does sans the WM sync protocol stuff.
Comment 3 Alexander Larsson 2013-02-18 14:48:37 UTC
Created attachment 236600 [details] [review]
win32: Request higher precision timers during animations

The default windows timer resolution is 16msec, which is to little
for fluent animations (say at 60Hz). So, while a paint clock is
active we temporarily raise the timer resolution to 1 msec.
Comment 4 Alexander Larsson 2013-02-18 16:15:58 UTC
first patch and a version of the last pushed, the second isn't really right as it has no way to sync with the real presentation time.