Re: Answers to some comments about frame synchronization

On Fri, 2013-02-15 at 09:21 +0100, Alexander Larsson wrote:

In terms of using timeBeginPeriod() and timeEndPeriod(), unfortunately,
the GDK level API has no concept of a "running animation", so it's not
clear when GDK would set up a period. We could add such a thing -
basically gdk_frame_clock_begin_continual_updates() - which would help
for style animations and gtk_widget_add_tick_count(). It wouldn't help
if a higher level built on top of GTK+ has an interface like
window.requestAnimationFrame() or we're reacting to mouse events.

We could add such an api though. For instance, we could have a
refcounted api on the paint clock like gdk_paint_clock_use/unuse() such
that any running animations would cause a clock use and thus higher
timing resolution on win32. 

I tried creating such an API - patch at:

It's a reasonable addition, and in some ways an improvement, though it
makes the API a bit less minimal.

- Owen

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]