clutter/stage-view: Allow stage view to allocate frame
This will be used to allow the native backend to allocate a KMS update that'll be used for one frame. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2855>
This commit is contained in:
parent
b80e84dea6
commit
678dc3243f
@ -1278,9 +1278,23 @@ handle_frame_clock_frame (ClutterFrameClock *frame_clock,
|
|||||||
return clutter_frame_get_result (frame);
|
return clutter_frame_get_result (frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static ClutterFrame *
|
||||||
|
handle_frame_clock_new_frame (ClutterFrameClock *frame_clock,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
ClutterStageView *view = CLUTTER_STAGE_VIEW (user_data);
|
||||||
|
ClutterStageViewClass *view_class = CLUTTER_STAGE_VIEW_GET_CLASS (view);
|
||||||
|
|
||||||
|
if (view_class->new_frame)
|
||||||
|
return view_class->new_frame (view);
|
||||||
|
else
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static const ClutterFrameListenerIface frame_clock_listener_iface = {
|
static const ClutterFrameListenerIface frame_clock_listener_iface = {
|
||||||
.before_frame = handle_frame_clock_before_frame,
|
.before_frame = handle_frame_clock_before_frame,
|
||||||
.frame = handle_frame_clock_frame,
|
.frame = handle_frame_clock_frame,
|
||||||
|
.new_frame = handle_frame_clock_new_frame,
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -50,6 +50,8 @@ struct _ClutterStageViewClass
|
|||||||
int dst_width,
|
int dst_width,
|
||||||
int dst_height,
|
int dst_height,
|
||||||
cairo_rectangle_int_t *dst_rect);
|
cairo_rectangle_int_t *dst_rect);
|
||||||
|
|
||||||
|
ClutterFrame * (* new_frame) (ClutterStageView *view);
|
||||||
};
|
};
|
||||||
|
|
||||||
CLUTTER_EXPORT
|
CLUTTER_EXPORT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user