diff --git a/clutter/clutter/clutter-frame-clock.c b/clutter/clutter/clutter-frame-clock.c index fccc55aca..e4f03df6b 100644 --- a/clutter/clutter/clutter-frame-clock.c +++ b/clutter/clutter/clutter-frame-clock.c @@ -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; diff --git a/clutter/clutter/clutter-frame-clock.h b/clutter/clutter/clutter-frame-clock.h index 9dfc8dc28..6fd5de47a 100644 --- a/clutter/clutter/clutter-frame-clock.h +++ b/clutter/clutter/clutter-frame-clock.h @@ -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