summaryrefslogtreecommitdiff
path: root/clutter
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2021-01-28 11:09:12 +0300
committerMarge Bot <marge-bot@gnome.org>2021-03-08 09:48:11 +0000
commit99efb40cce1da5147e649098f4d4471661355995 (patch)
tree11da32286cc57db580bf2d8454be88c21905f026 /clutter
parentc96fb181abd3234784e6a77a87d46cef17699874 (diff)
downloadmutter-99efb40cce1da5147e649098f4d4471661355995.tar.gz
clutter/frame-info: Add sequence
It will be used for the presentation-time Wayland protocol. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1484>
Diffstat (limited to 'clutter')
-rw-r--r--clutter/clutter/clutter-stage.h2
-rw-r--r--clutter/clutter/cogl/clutter-stage-cogl.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/clutter/clutter/clutter-stage.h b/clutter/clutter/clutter-stage.h
index 9c4abfe53..c697e3182 100644
--- a/clutter/clutter/clutter-stage.h
+++ b/clutter/clutter/clutter-stage.h
@@ -131,6 +131,8 @@ struct _ClutterFrameInfo
float refresh_rate;
ClutterFrameInfoFlag flags;
+
+ unsigned int sequence;
};
typedef struct _ClutterCapture
diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c
index fba79a6de..8c9c50371 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.c
+++ b/clutter/clutter/cogl/clutter-stage-cogl.c
@@ -319,6 +319,7 @@ swap_framebuffer (ClutterStageWindow *stage_window,
.refresh_rate = clutter_stage_view_get_refresh_rate (view),
.presentation_time = g_get_monotonic_time (),
.flags = CLUTTER_FRAME_INFO_FLAG_NONE,
+ .sequence = 0,
};
priv->global_frame_counter++;
@@ -837,6 +838,7 @@ frame_cb (CoglOnscreen *onscreen,
.presentation_time =
cogl_frame_info_get_presentation_time_us (frame_info),
.flags = flags,
+ .sequence = cogl_frame_info_get_sequence (frame_info),
};
clutter_stage_view_notify_presented (view, &clutter_frame_info);
}