From feb8bfa0bf23310417e37ef87e87dd30e8d92ad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 2 Jun 2020 11:27:39 +0200 Subject: [PATCH] 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 --- clutter/clutter/clutter-frame-clock.c | 6 ++++++ clutter/clutter/clutter-frame-clock.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/clutter/clutter/clutter-frame-clock.c b/clutter/clutter/clutter-frame-clock.c index 1ea524aca..3ff7ca551 100644 --- a/clutter/clutter/clutter-frame-clock.c +++ b/clutter/clutter/clutter-frame-clock.c @@ -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) diff --git a/clutter/clutter/clutter-frame-clock.h b/clutter/clutter/clutter-frame-clock.h index 20ed79fb2..60eb41ea7 100644 --- a/clutter/clutter/clutter-frame-clock.h +++ b/clutter/clutter/clutter-frame-clock.h @@ -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 */