[mutter/gbsneto/charts: 48/50] clutter/stage: Add private getter to sync delay
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/charts: 48/50] clutter/stage: Add private getter to sync delay
- Date: Thu, 18 Apr 2019 01:21:56 +0000 (UTC)
commit 6350efc28ee21b2a3fd4c6669bcf50a85f24926b
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Mar 27 10:53:46 2019 -0300
clutter/stage: Add private getter to sync delay
It will be used by the frame chart to correctly place
the red bar. The math is essentially:
ms_per_frame = (1 / refresh rate) * 1000 - sync delay
https://gitlab.gnome.org/GNOME/mutter/merge_requests/502
clutter/clutter/clutter-stage-private.h | 2 ++
clutter/clutter/clutter-stage.c | 8 ++++++++
2 files changed, 10 insertions(+)
---
diff --git a/clutter/clutter/clutter-stage-private.h b/clutter/clutter/clutter-stage-private.h
index 4799c29e1..cb887ea32 100644
--- a/clutter/clutter/clutter-stage-private.h
+++ b/clutter/clutter/clutter-stage-private.h
@@ -134,6 +134,8 @@ void _clutter_stage_presented (ClutterStage *stag
GList * _clutter_stage_peek_stage_views (ClutterStage *stage);
+int clutter_stage_get_sync_delay (ClutterStage *stage);
+
G_END_DECLS
#endif /* __CLUTTER_STAGE_PRIVATE_H__ */
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index 25ce9d899..1cb5cb9b6 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -4722,6 +4722,14 @@ clutter_stage_set_sync_delay (ClutterStage *stage,
stage->priv->sync_delay = sync_delay;
}
+int
+clutter_stage_get_sync_delay (ClutterStage *stage)
+{
+ g_return_val_if_fail (CLUTTER_IS_STAGE (stage), -1);
+
+ return stage->priv->sync_delay;
+}
+
/**
* clutter_stage_skip_sync_delay:
* @stage: a #ClutterStage
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]