diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2012-11-14 12:49:06 -0500 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2013-02-14 17:19:50 -0500 |
commit | 15ee04c66f0e0d34106eb12e815b5f8f2a2b3c5f (patch) | |
tree | 0259ffa7774d2491ad83948fc6ba072e38b010bb /gdk/gdkframeclock.c | |
parent | d761df7e0c73341a191b45ac5c30c44eaf31e305 (diff) | |
download | gtk+-15ee04c66f0e0d34106eb12e815b5f8f2a2b3c5f.tar.gz |
Add GdkFrameHistory and GdkFrameTimings, handle _NET_WM_FRAME_TIMINGS
In order to be able to track statistics about how well we are drawing,
and in order to be able to do sophisticated things with frame timing
like predicting per-frame latencies and synchronizing audio with video,
we need to be able to track exactly when previous frames were drawn
to the screen.
Information about each frame is stored in a new GdkFrameTimings object.
A new GdkFrameHistory object is added which keeps a queue of recent
GdkFrameTimings (this is added to avoid further complicating the
implementation of GdkFrameClock.)
https://bugzilla.gnome.org/show_bug.cgi?id=685460
Diffstat (limited to 'gdk/gdkframeclock.c')
-rw-r--r-- | gdk/gdkframeclock.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gdk/gdkframeclock.c b/gdk/gdkframeclock.c index 8c6d202102..ecb84bd8aa 100644 --- a/gdk/gdkframeclock.c +++ b/gdk/gdkframeclock.c @@ -305,6 +305,23 @@ gdk_frame_clock_thaw (GdkFrameClock *clock) } /** + * gdk_frame_clock_get_history: + * @clock: the clock + * + * Gets the #GdkFrameHistory for the frame clock. + * + * Since: 3.8 + * Return value: (transfer none): the frame history object + */ +GdkFrameHistory * +gdk_frame_clock_get_history (GdkFrameClock *clock) +{ + g_return_val_if_fail (GDK_IS_FRAME_CLOCK (clock), NULL); + + return GDK_FRAME_CLOCK_GET_IFACE (clock)->get_history (clock); +} + +/** * gdk_frame_clock_get_requested: * @clock: the clock * |