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,
|
before_stage_painted (MetaStage *stage,
|
||||||
ClutterStageView *view,
|
ClutterStageView *view,
|
||||||
ClutterPaintContext *paint_context,
|
ClutterPaintContext *paint_context,
|
||||||
|
ClutterFrame *frame,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
MetaScreenCastAreaStreamSrc *area_src =
|
MetaScreenCastAreaStreamSrc *area_src =
|
||||||
@ -267,6 +268,7 @@ static void
|
|||||||
stage_painted (MetaStage *stage,
|
stage_painted (MetaStage *stage,
|
||||||
ClutterStageView *view,
|
ClutterStageView *view,
|
||||||
ClutterPaintContext *paint_context,
|
ClutterPaintContext *paint_context,
|
||||||
|
ClutterFrame *frame,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
MetaScreenCastAreaStreamSrc *area_src =
|
MetaScreenCastAreaStreamSrc *area_src =
|
||||||
|
@ -152,6 +152,7 @@ static void
|
|||||||
stage_painted (MetaStage *stage,
|
stage_painted (MetaStage *stage,
|
||||||
ClutterStageView *view,
|
ClutterStageView *view,
|
||||||
ClutterPaintContext *paint_context,
|
ClutterPaintContext *paint_context,
|
||||||
|
ClutterFrame *frame,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
MetaScreenCastMonitorStreamSrc *monitor_src =
|
MetaScreenCastMonitorStreamSrc *monitor_src =
|
||||||
@ -171,6 +172,7 @@ static void
|
|||||||
before_stage_painted (MetaStage *stage,
|
before_stage_painted (MetaStage *stage,
|
||||||
ClutterStageView *view,
|
ClutterStageView *view,
|
||||||
ClutterPaintContext *paint_context,
|
ClutterPaintContext *paint_context,
|
||||||
|
ClutterFrame *frame,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
MetaScreenCastMonitorStreamSrc *monitor_src =
|
MetaScreenCastMonitorStreamSrc *monitor_src =
|
||||||
|
@ -186,6 +186,7 @@ static void
|
|||||||
actors_painted (MetaStage *stage,
|
actors_painted (MetaStage *stage,
|
||||||
ClutterStageView *view,
|
ClutterStageView *view,
|
||||||
ClutterPaintContext *paint_context,
|
ClutterPaintContext *paint_context,
|
||||||
|
ClutterFrame *frame,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
MetaScreenCastStreamSrc *src = META_SCREEN_CAST_STREAM_SRC (user_data);
|
MetaScreenCastStreamSrc *src = META_SCREEN_CAST_STREAM_SRC (user_data);
|
||||||
|
@ -42,6 +42,7 @@ typedef enum
|
|||||||
typedef void (* MetaStageWatchFunc) (MetaStage *stage,
|
typedef void (* MetaStageWatchFunc) (MetaStage *stage,
|
||||||
ClutterStageView *view,
|
ClutterStageView *view,
|
||||||
ClutterPaintContext *paint_context,
|
ClutterPaintContext *paint_context,
|
||||||
|
ClutterFrame *frame,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
ClutterActor *meta_stage_new (MetaBackend *backend);
|
ClutterActor *meta_stage_new (MetaBackend *backend);
|
||||||
|
@ -189,6 +189,7 @@ static void
|
|||||||
notify_watchers_for_mode (MetaStage *stage,
|
notify_watchers_for_mode (MetaStage *stage,
|
||||||
ClutterStageView *view,
|
ClutterStageView *view,
|
||||||
ClutterPaintContext *paint_context,
|
ClutterPaintContext *paint_context,
|
||||||
|
ClutterFrame *frame,
|
||||||
MetaStageWatchPhase watch_phase)
|
MetaStageWatchPhase watch_phase)
|
||||||
{
|
{
|
||||||
GPtrArray *watchers;
|
GPtrArray *watchers;
|
||||||
@ -203,7 +204,7 @@ notify_watchers_for_mode (MetaStage *stage,
|
|||||||
if (watch->view && view != watch->view)
|
if (watch->view && view != watch->view)
|
||||||
continue;
|
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);
|
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);
|
META_STAGE_WATCH_BEFORE_PAINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,13 +225,15 @@ meta_stage_paint (ClutterActor *actor,
|
|||||||
{
|
{
|
||||||
MetaStage *stage = META_STAGE (actor);
|
MetaStage *stage = META_STAGE (actor);
|
||||||
ClutterStageView *view;
|
ClutterStageView *view;
|
||||||
|
ClutterFrame *frame;
|
||||||
|
|
||||||
CLUTTER_ACTOR_CLASS (meta_stage_parent_class)->paint (actor, paint_context);
|
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);
|
view = clutter_paint_context_get_stage_view (paint_context);
|
||||||
if (view)
|
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);
|
META_STAGE_WATCH_AFTER_ACTOR_PAINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -260,7 +263,7 @@ meta_stage_paint (ClutterActor *actor,
|
|||||||
|
|
||||||
if (view)
|
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);
|
META_STAGE_WATCH_AFTER_OVERLAY_PAINT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -277,7 +280,7 @@ meta_stage_paint_view (ClutterStage *stage,
|
|||||||
redraw_clip,
|
redraw_clip,
|
||||||
frame);
|
frame);
|
||||||
|
|
||||||
notify_watchers_for_mode (meta_stage, view, NULL,
|
notify_watchers_for_mode (meta_stage, view, NULL, frame,
|
||||||
META_STAGE_WATCH_AFTER_PAINT);
|
META_STAGE_WATCH_AFTER_PAINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,6 +273,7 @@ static void
|
|||||||
on_after_paint (MetaStage *stage,
|
on_after_paint (MetaStage *stage,
|
||||||
ClutterStageView *view,
|
ClutterStageView *view,
|
||||||
ClutterPaintContext *paint_context,
|
ClutterPaintContext *paint_context,
|
||||||
|
ClutterFrame *frame,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
CaptureViewData *data = user_data;
|
CaptureViewData *data = user_data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user