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.h | |
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.h')
-rw-r--r-- | gdk/gdkframeclock.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gdk/gdkframeclock.h b/gdk/gdkframeclock.h index d75fce984a..03b04304cd 100644 --- a/gdk/gdkframeclock.h +++ b/gdk/gdkframeclock.h @@ -31,7 +31,7 @@ #ifndef __GDK_FRAME_CLOCK_H__ #define __GDK_FRAME_CLOCK_H__ -#include <glib-object.h> +#include <gdk/gdkframehistory.h> G_BEGIN_DECLS @@ -87,6 +87,8 @@ struct _GdkFrameClockInterface void (* freeze) (GdkFrameClock *clock); void (* thaw) (GdkFrameClock *clock); + GdkFrameHistory * (* get_history) (GdkFrameClock *clock); + /* signals */ /* void (* frame_requested) (GdkFrameClock *clock); */ /* void (* flush_events) (GdkFrameClock *clock); */ @@ -109,6 +111,8 @@ GdkFrameClockPhase gdk_frame_clock_get_requested (GdkFrameClock *clock); void gdk_frame_clock_freeze (GdkFrameClock *clock); void gdk_frame_clock_thaw (GdkFrameClock *clock); +GdkFrameHistory *gdk_frame_clock_get_history (GdkFrameClock *clock); + /* Convenience API */ void gdk_frame_clock_get_frame_time_val (GdkFrameClock *clock, GTimeVal *timeval); |