clutter/frame-clock: Add refresh rate getter

This gets the refresh rate of the frame clock. To be used by tests.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1285
This commit is contained in:
Jonas Ådahl 2020-06-02 11:27:39 +02:00
parent 59a38fcb69
commit feb8bfa0bf
2 changed files with 9 additions and 0 deletions

View File

@ -77,6 +77,12 @@ struct _ClutterFrameClock
G_DEFINE_TYPE (ClutterFrameClock, clutter_frame_clock,
G_TYPE_OBJECT)
float
clutter_frame_clock_get_refresh_rate (ClutterFrameClock *frame_clock)
{
return frame_clock->refresh_rate;
}
void
clutter_frame_clock_add_timeline (ClutterFrameClock *frame_clock,
ClutterTimeline *timeline)

View File

@ -78,4 +78,7 @@ void clutter_frame_clock_add_timeline (ClutterFrameClock *frame_clock,
void clutter_frame_clock_remove_timeline (ClutterFrameClock *frame_clock,
ClutterTimeline *timeline);
CLUTTER_EXPORT
float clutter_frame_clock_get_refresh_rate (ClutterFrameClock *frame_clock);
#endif /* CLUTTER_FRAME_CLOCK_H */