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
This commit is contained in:
@ -62,6 +62,10 @@ gint64 gdk_frame_timings_get_refresh_interval (GdkFrameTimings *timin
|
||||
void gdk_frame_timings_set_refresh_interval (GdkFrameTimings *timings,
|
||||
gint64 refresh_interval);
|
||||
|
||||
gint64 gdk_frame_timings_get_predicted_presentation_time (GdkFrameTimings *timings);
|
||||
void gdk_frame_timings_set_predicted_presentation_time (GdkFrameTimings *timings,
|
||||
gint64 predicted_presentation_time);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_FRAME_TIMINGS_H__ */
|
||||
|
||||
Reference in New Issue
Block a user