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>
This commit is contained in:
parent
c96fb181ab
commit
99efb40cce
@ -131,6 +131,8 @@ struct _ClutterFrameInfo
|
|||||||
float refresh_rate;
|
float refresh_rate;
|
||||||
|
|
||||||
ClutterFrameInfoFlag flags;
|
ClutterFrameInfoFlag flags;
|
||||||
|
|
||||||
|
unsigned int sequence;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _ClutterCapture
|
typedef struct _ClutterCapture
|
||||||
|
@ -319,6 +319,7 @@ swap_framebuffer (ClutterStageWindow *stage_window,
|
|||||||
.refresh_rate = clutter_stage_view_get_refresh_rate (view),
|
.refresh_rate = clutter_stage_view_get_refresh_rate (view),
|
||||||
.presentation_time = g_get_monotonic_time (),
|
.presentation_time = g_get_monotonic_time (),
|
||||||
.flags = CLUTTER_FRAME_INFO_FLAG_NONE,
|
.flags = CLUTTER_FRAME_INFO_FLAG_NONE,
|
||||||
|
.sequence = 0,
|
||||||
};
|
};
|
||||||
priv->global_frame_counter++;
|
priv->global_frame_counter++;
|
||||||
|
|
||||||
@ -837,6 +838,7 @@ frame_cb (CoglOnscreen *onscreen,
|
|||||||
.presentation_time =
|
.presentation_time =
|
||||||
cogl_frame_info_get_presentation_time_us (frame_info),
|
cogl_frame_info_get_presentation_time_us (frame_info),
|
||||||
.flags = flags,
|
.flags = flags,
|
||||||
|
.sequence = cogl_frame_info_get_sequence (frame_info),
|
||||||
};
|
};
|
||||||
clutter_stage_view_notify_presented (view, &clutter_frame_info);
|
clutter_stage_view_notify_presented (view, &clutter_frame_info);
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ timeline_frame_clock_frame (ClutterFrameClock *frame_clock,
|
|||||||
.presentation_time = g_get_monotonic_time (),
|
.presentation_time = g_get_monotonic_time (),
|
||||||
.refresh_rate = refresh_rate,
|
.refresh_rate = refresh_rate,
|
||||||
.flags = CLUTTER_FRAME_INFO_FLAG_NONE,
|
.flags = CLUTTER_FRAME_INFO_FLAG_NONE,
|
||||||
|
.sequence = 0,
|
||||||
};
|
};
|
||||||
clutter_frame_clock_notify_presented (frame_clock, &frame_info);
|
clutter_frame_clock_notify_presented (frame_clock, &frame_info);
|
||||||
clutter_frame_clock_schedule_update (frame_clock);
|
clutter_frame_clock_schedule_update (frame_clock);
|
||||||
|
@ -33,6 +33,7 @@ init_frame_info (ClutterFrameInfo *frame_info,
|
|||||||
.presentation_time = presentation_time_us,
|
.presentation_time = presentation_time_us,
|
||||||
.refresh_rate = refresh_rate,
|
.refresh_rate = refresh_rate,
|
||||||
.flags = CLUTTER_FRAME_INFO_FLAG_NONE,
|
.flags = CLUTTER_FRAME_INFO_FLAG_NONE,
|
||||||
|
.sequence = 0,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user