mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
frame-clock: Store interface pointer in variable
It's accessed a few times, so keep it around. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2795>
This commit is contained in:
parent
768ec7b0c1
commit
1c574068e0
@ -690,6 +690,7 @@ static void
|
|||||||
clutter_frame_clock_dispatch (ClutterFrameClock *frame_clock,
|
clutter_frame_clock_dispatch (ClutterFrameClock *frame_clock,
|
||||||
int64_t time_us)
|
int64_t time_us)
|
||||||
{
|
{
|
||||||
|
const ClutterFrameListenerIface *iface = frame_clock->listener.iface;
|
||||||
int64_t frame_count;
|
int64_t frame_count;
|
||||||
ClutterFrameResult result;
|
ClutterFrameResult result;
|
||||||
int64_t ideal_dispatch_time_us, lateness_us;
|
int64_t ideal_dispatch_time_us, lateness_us;
|
||||||
@ -729,9 +730,9 @@ clutter_frame_clock_dispatch (ClutterFrameClock *frame_clock,
|
|||||||
frame_count = frame_clock->frame_count++;
|
frame_count = frame_clock->frame_count++;
|
||||||
|
|
||||||
COGL_TRACE_BEGIN (ClutterFrameClockEvents, "Frame Clock (before frame)");
|
COGL_TRACE_BEGIN (ClutterFrameClockEvents, "Frame Clock (before frame)");
|
||||||
if (frame_clock->listener.iface->before_frame)
|
if (iface->before_frame)
|
||||||
{
|
{
|
||||||
frame_clock->listener.iface->before_frame (frame_clock,
|
iface->before_frame (frame_clock,
|
||||||
frame_count,
|
frame_count,
|
||||||
frame_clock->listener.user_data);
|
frame_clock->listener.user_data);
|
||||||
}
|
}
|
||||||
@ -744,7 +745,7 @@ clutter_frame_clock_dispatch (ClutterFrameClock *frame_clock,
|
|||||||
COGL_TRACE_END (ClutterFrameClockTimelines);
|
COGL_TRACE_END (ClutterFrameClockTimelines);
|
||||||
|
|
||||||
COGL_TRACE_BEGIN (ClutterFrameClockFrame, "Frame Clock (frame)");
|
COGL_TRACE_BEGIN (ClutterFrameClockFrame, "Frame Clock (frame)");
|
||||||
result = frame_clock->listener.iface->frame (frame_clock,
|
result = iface->frame (frame_clock,
|
||||||
frame_count,
|
frame_count,
|
||||||
frame_clock->listener.user_data);
|
frame_clock->listener.user_data);
|
||||||
COGL_TRACE_END (ClutterFrameClockFrame);
|
COGL_TRACE_END (ClutterFrameClockFrame);
|
||||||
|
Loading…
Reference in New Issue
Block a user