summaryrefslogtreecommitdiff
path: root/gdk/gdkframeclock.h
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2012-11-15 14:11:41 -0500
committerOwen W. Taylor <otaylor@fishsoup.net>2013-02-14 17:19:51 -0500
commitfb44ea8a85db3e41f10304f559772f2c10d28c29 (patch)
treee05881074a4aa92e186fe25ffa756fb5d16391b4 /gdk/gdkframeclock.h
parent8855bf052d8bbbd8fdfce1cd5f4a3540661a9c8e (diff)
downloadgtk+-fb44ea8a85db3e41f10304f559772f2c10d28c29.tar.gz
Add gdk_frame_timings_get_predicted_presentation_time()
For an operation like synchronizing audio to video playback, we need to be able to predict the time that a frame will be presented. The details of this depend on the windowing system, so make the backend predict a presentation time for ::begin-frame and set it on the GdkFrameTimings. The timing algorithm of GdkFrameClockIdle is adjusted to give predictable presentation times for frames that are not throttled by the windowing system. Helper functions: gdk_frame_clock_get_current_frame_timings() gdk_frame_clock_get_refresh_info() are added for operations that would otherwise be needed multiple times in different locations. https://bugzilla.gnome.org/show_bug.cgi?id=685460
Diffstat (limited to 'gdk/gdkframeclock.h')
-rw-r--r--gdk/gdkframeclock.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/gdk/gdkframeclock.h b/gdk/gdkframeclock.h
index 03b04304cd..8d79f90a96 100644
--- a/gdk/gdkframeclock.h
+++ b/gdk/gdkframeclock.h
@@ -78,7 +78,7 @@ struct _GdkFrameClockInterface
{
GTypeInterface base_iface;
- guint64 (* get_frame_time) (GdkFrameClock *clock);
+ guint64 (* get_frame_time) (GdkFrameClock *clock);
void (* request_phase) (GdkFrameClock *clock,
GdkFrameClockPhase phase);
@@ -102,7 +102,7 @@ struct _GdkFrameClockInterface
GType gdk_frame_clock_get_type (void) G_GNUC_CONST;
-guint64 gdk_frame_clock_get_frame_time (GdkFrameClock *clock);
+guint64 gdk_frame_clock_get_frame_time (GdkFrameClock *clock);
void gdk_frame_clock_request_phase (GdkFrameClock *clock,
GdkFrameClockPhase phase);
@@ -117,6 +117,13 @@ GdkFrameHistory *gdk_frame_clock_get_history (GdkFrameClock *clock);
void gdk_frame_clock_get_frame_time_val (GdkFrameClock *clock,
GTimeVal *timeval);
+void gdk_frame_clock_get_refresh_info (GdkFrameClock *clock,
+ gint64 base_time,
+ gint64 *refresh_interval_return,
+ gint64 *presentation_time_return);
+
+GdkFrameTimings *gdk_frame_clock_get_current_frame_timings (GdkFrameClock *clock);
+
/* Signal emitters (used in frame clock implementations) */
void gdk_frame_clock_frame_requested (GdkFrameClock *clock);