mirror of
https://github.com/brl/mutter.git
synced 2025-01-13 13:12:28 +00:00
backends/stage: Pass ClutterFrame to MetaStageWatchFunc
We'll need to access the timestamp of the frame later on, so pass it to stage watchers. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2804>
This commit is contained in:
parent
81c9c43d26
commit
b47d96b862
@ -248,6 +248,7 @@ static void
|
||||
before_stage_painted (MetaStage *stage,
|
||||
ClutterStageView *view,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterFrame *frame,
|
||||
gpointer user_data)
|
||||
{
|
||||
MetaScreenCastAreaStreamSrc *area_src =
|
||||
@ -267,6 +268,7 @@ static void
|
||||
stage_painted (MetaStage *stage,
|
||||
ClutterStageView *view,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterFrame *frame,
|
||||
gpointer user_data)
|
||||
{
|
||||
MetaScreenCastAreaStreamSrc *area_src =
|
||||
|
@ -152,6 +152,7 @@ static void
|
||||
stage_painted (MetaStage *stage,
|
||||
ClutterStageView *view,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterFrame *frame,
|
||||
gpointer user_data)
|
||||
{
|
||||
MetaScreenCastMonitorStreamSrc *monitor_src =
|
||||
@ -171,6 +172,7 @@ static void
|
||||
before_stage_painted (MetaStage *stage,
|
||||
ClutterStageView *view,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterFrame *frame,
|
||||
gpointer user_data)
|
||||
{
|
||||
MetaScreenCastMonitorStreamSrc *monitor_src =
|
||||
|
@ -186,6 +186,7 @@ static void
|
||||
actors_painted (MetaStage *stage,
|
||||
ClutterStageView *view,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterFrame *frame,
|
||||
gpointer user_data)
|
||||
{
|
||||
MetaScreenCastStreamSrc *src = META_SCREEN_CAST_STREAM_SRC (user_data);
|
||||
|
@ -42,6 +42,7 @@ typedef enum
|
||||
typedef void (* MetaStageWatchFunc) (MetaStage *stage,
|
||||
ClutterStageView *view,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterFrame *frame,
|
||||
gpointer user_data);
|
||||
|
||||
ClutterActor *meta_stage_new (MetaBackend *backend);
|
||||
|
@ -189,6 +189,7 @@ static void
|
||||
notify_watchers_for_mode (MetaStage *stage,
|
||||
ClutterStageView *view,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterFrame *frame,
|
||||
MetaStageWatchPhase watch_phase)
|
||||
{
|
||||
GPtrArray *watchers;
|
||||
@ -203,7 +204,7 @@ notify_watchers_for_mode (MetaStage *stage,
|
||||
if (watch->view && view != watch->view)
|
||||
continue;
|
||||
|
||||
watch->callback (stage, view, paint_context, watch->user_data);
|
||||
watch->callback (stage, view, paint_context, frame, watch->user_data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,7 +215,7 @@ meta_stage_before_paint (ClutterStage *stage,
|
||||
{
|
||||
MetaStage *meta_stage = META_STAGE (stage);
|
||||
|
||||
notify_watchers_for_mode (meta_stage, view, NULL,
|
||||
notify_watchers_for_mode (meta_stage, view, NULL, frame,
|
||||
META_STAGE_WATCH_BEFORE_PAINT);
|
||||
}
|
||||
|
||||
@ -224,13 +225,15 @@ meta_stage_paint (ClutterActor *actor,
|
||||
{
|
||||
MetaStage *stage = META_STAGE (actor);
|
||||
ClutterStageView *view;
|
||||
ClutterFrame *frame;
|
||||
|
||||
CLUTTER_ACTOR_CLASS (meta_stage_parent_class)->paint (actor, paint_context);
|
||||
|
||||
frame = clutter_paint_context_get_frame (paint_context);
|
||||
view = clutter_paint_context_get_stage_view (paint_context);
|
||||
if (view)
|
||||
{
|
||||
notify_watchers_for_mode (stage, view, paint_context,
|
||||
notify_watchers_for_mode (stage, view, paint_context, frame,
|
||||
META_STAGE_WATCH_AFTER_ACTOR_PAINT);
|
||||
}
|
||||
|
||||
@ -260,7 +263,7 @@ meta_stage_paint (ClutterActor *actor,
|
||||
|
||||
if (view)
|
||||
{
|
||||
notify_watchers_for_mode (stage, view, paint_context,
|
||||
notify_watchers_for_mode (stage, view, paint_context, frame,
|
||||
META_STAGE_WATCH_AFTER_OVERLAY_PAINT);
|
||||
}
|
||||
}
|
||||
@ -277,7 +280,7 @@ meta_stage_paint_view (ClutterStage *stage,
|
||||
redraw_clip,
|
||||
frame);
|
||||
|
||||
notify_watchers_for_mode (meta_stage, view, NULL,
|
||||
notify_watchers_for_mode (meta_stage, view, NULL, frame,
|
||||
META_STAGE_WATCH_AFTER_PAINT);
|
||||
}
|
||||
|
||||
|
@ -273,6 +273,7 @@ static void
|
||||
on_after_paint (MetaStage *stage,
|
||||
ClutterStageView *view,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterFrame *frame,
|
||||
gpointer user_data)
|
||||
{
|
||||
CaptureViewData *data = user_data;
|
||||
|
Loading…
Reference in New Issue
Block a user