mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
clutter/frame-clock: Allow frame clock listener iface allocate frame
This will allow the frame clock listener to allocate larger structs where it can keep e.g. backend specific frame state. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2855>
This commit is contained in:
parent
1abd930c56
commit
b80e84dea6
@ -732,7 +732,11 @@ clutter_frame_clock_dispatch (ClutterFrameClock *frame_clock,
|
||||
|
||||
frame_count = frame_clock->frame_count++;
|
||||
|
||||
frame = clutter_frame_new ();
|
||||
if (iface->new_frame)
|
||||
frame = iface->new_frame (frame_clock, frame_clock->listener.user_data);
|
||||
if (!frame)
|
||||
frame = clutter_frame_new ();
|
||||
|
||||
frame->frame_count = frame_count;
|
||||
frame->has_target_presentation_time = frame_clock->is_next_presentation_time_valid;
|
||||
frame->target_presentation_time_us = frame_clock->next_presentation_time_us;
|
||||
|
@ -51,6 +51,8 @@ typedef struct _ClutterFrameListenerIface
|
||||
ClutterFrameResult (* frame) (ClutterFrameClock *frame_clock,
|
||||
ClutterFrame *frame,
|
||||
gpointer user_data);
|
||||
ClutterFrame * (* new_frame) (ClutterFrameClock *frame_clock,
|
||||
gpointer user_data);
|
||||
} ClutterFrameListenerIface;
|
||||
|
||||
CLUTTER_EXPORT
|
||||
|
Loading…
Reference in New Issue
Block a user