[mutter] clutter/frame-info: Add sequence



commit 99efb40cce1da5147e649098f4d4471661355995
Author: Ivan Molodetskikh <yalterz gmail com>
Date:   Thu Jan 28 11:09:12 2021 +0300

    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>

 clutter/clutter/clutter-stage.h                  | 2 ++
 clutter/clutter/cogl/clutter-stage-cogl.c        | 2 ++
 src/tests/clutter/conform/frame-clock-timeline.c | 1 +
 src/tests/clutter/conform/frame-clock.c          | 1 +
 4 files changed, 6 insertions(+)
---
diff --git a/clutter/clutter/clutter-stage.h b/clutter/clutter/clutter-stage.h
index 9c4abfe536..c697e31821 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 fba79a6de5..8c9c503718 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);
     }
diff --git a/src/tests/clutter/conform/frame-clock-timeline.c 
b/src/tests/clutter/conform/frame-clock-timeline.c
index cee2d369f3..bf99cd17b4 100644
--- a/src/tests/clutter/conform/frame-clock-timeline.c
+++ b/src/tests/clutter/conform/frame-clock-timeline.c
@@ -15,6 +15,7 @@ timeline_frame_clock_frame (ClutterFrameClock *frame_clock,
     .presentation_time = g_get_monotonic_time (),
     .refresh_rate = refresh_rate,
     .flags = CLUTTER_FRAME_INFO_FLAG_NONE,
+    .sequence = 0,
   };
   clutter_frame_clock_notify_presented (frame_clock, &frame_info);
   clutter_frame_clock_schedule_update (frame_clock);
diff --git a/src/tests/clutter/conform/frame-clock.c b/src/tests/clutter/conform/frame-clock.c
index 1354c8423e..45d21ccec2 100644
--- a/src/tests/clutter/conform/frame-clock.c
+++ b/src/tests/clutter/conform/frame-clock.c
@@ -33,6 +33,7 @@ init_frame_info (ClutterFrameInfo *frame_info,
     .presentation_time = presentation_time_us,
     .refresh_rate = refresh_rate,
     .flags = CLUTTER_FRAME_INFO_FLAG_NONE,
+    .sequence = 0,
   };
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]