mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 12:32:05 +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,11 +730,11 @@ 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);
|
||||||
}
|
}
|
||||||
COGL_TRACE_END (ClutterFrameClockEvents);
|
COGL_TRACE_END (ClutterFrameClockEvents);
|
||||||
|
|
||||||
@ -744,9 +745,9 @@ 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);
|
||||||
|
|
||||||
switch (frame_clock->state)
|
switch (frame_clock->state)
|
||||||
|
Loading…
Reference in New Issue
Block a user