mirror of
https://github.com/brl/mutter.git
synced 2025-02-04 15:44:10 +00:00
clutter/frame-clock: Store output name
Will be used in a subsequent commit for including the output name in COGL_TRACE plot names. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3417>
This commit is contained in:
parent
bed42454d3
commit
77413ed9a0
@ -110,6 +110,8 @@ struct _ClutterFrameClock
|
||||
int64_t missed_frame_report_time_us;
|
||||
|
||||
int64_t last_dispatch_interval_us;
|
||||
|
||||
char *output_name;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (ClutterFrameClock, clutter_frame_clock,
|
||||
@ -897,6 +899,7 @@ init_frame_clock_source (ClutterFrameClock *frame_clock)
|
||||
ClutterFrameClock *
|
||||
clutter_frame_clock_new (float refresh_rate,
|
||||
int64_t vblank_duration_us,
|
||||
const char *output_name,
|
||||
const ClutterFrameListenerIface *iface,
|
||||
gpointer user_data)
|
||||
{
|
||||
@ -914,6 +917,8 @@ clutter_frame_clock_new (float refresh_rate,
|
||||
clutter_frame_clock_set_refresh_rate (frame_clock, refresh_rate);
|
||||
frame_clock->vblank_duration_us = vblank_duration_us;
|
||||
|
||||
frame_clock->output_name = g_strdup (output_name);
|
||||
|
||||
return frame_clock;
|
||||
}
|
||||
|
||||
@ -938,6 +943,8 @@ clutter_frame_clock_dispose (GObject *object)
|
||||
g_clear_pointer (&frame_clock->source, g_source_unref);
|
||||
}
|
||||
|
||||
g_clear_pointer (&frame_clock->output_name, g_free);
|
||||
|
||||
G_OBJECT_CLASS (clutter_frame_clock_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
|
@ -57,6 +57,7 @@ typedef struct _ClutterFrameListenerIface
|
||||
CLUTTER_EXPORT
|
||||
ClutterFrameClock * clutter_frame_clock_new (float refresh_rate,
|
||||
int64_t vblank_duration_us,
|
||||
const char *name,
|
||||
const ClutterFrameListenerIface *iface,
|
||||
gpointer user_data);
|
||||
|
||||
|
@ -1113,6 +1113,7 @@ clutter_stage_view_constructed (GObject *object)
|
||||
|
||||
priv->frame_clock = clutter_frame_clock_new (priv->refresh_rate,
|
||||
priv->vblank_duration_us,
|
||||
priv->name,
|
||||
&frame_clock_listener_iface,
|
||||
view);
|
||||
|
||||
|
@ -71,6 +71,7 @@ frame_clock_timeline_basic (void)
|
||||
main_loop = g_main_loop_new (NULL, FALSE);
|
||||
frame_clock = clutter_frame_clock_new (refresh_rate,
|
||||
0,
|
||||
NULL,
|
||||
&timeline_frame_listener_iface,
|
||||
NULL);
|
||||
g_object_add_weak_pointer (G_OBJECT (frame_clock), (gpointer *) &frame_clock);
|
||||
@ -153,11 +154,13 @@ frame_clock_timeline_switch (void)
|
||||
|
||||
frame_clock1 = clutter_frame_clock_new (refresh_rate,
|
||||
0,
|
||||
NULL,
|
||||
&timeline_frame_listener_iface,
|
||||
NULL);
|
||||
g_object_add_weak_pointer (G_OBJECT (frame_clock1), (gpointer *) &frame_clock1);
|
||||
frame_clock2 = clutter_frame_clock_new (refresh_rate,
|
||||
0,
|
||||
NULL,
|
||||
&timeline_frame_listener_iface,
|
||||
NULL);
|
||||
g_object_add_weak_pointer (G_OBJECT (frame_clock2), (gpointer *) &frame_clock2);
|
||||
|
@ -147,6 +147,7 @@ frame_clock_schedule_update (void)
|
||||
test.main_loop = g_main_loop_new (NULL, FALSE);
|
||||
frame_clock = clutter_frame_clock_new (refresh_rate,
|
||||
0,
|
||||
NULL,
|
||||
&frame_listener_iface,
|
||||
&test);
|
||||
|
||||
@ -234,6 +235,7 @@ frame_clock_immediate_present (void)
|
||||
main_loop = g_main_loop_new (NULL, FALSE);
|
||||
frame_clock = clutter_frame_clock_new (refresh_rate,
|
||||
0,
|
||||
NULL,
|
||||
&immediate_frame_listener_iface,
|
||||
main_loop);
|
||||
|
||||
@ -312,6 +314,7 @@ frame_clock_delayed_damage (void)
|
||||
test.main_loop = g_main_loop_new (NULL, FALSE);
|
||||
frame_clock = clutter_frame_clock_new (refresh_rate,
|
||||
0,
|
||||
NULL,
|
||||
&delayed_damage_frame_listener_iface,
|
||||
&test);
|
||||
|
||||
@ -372,6 +375,7 @@ frame_clock_no_damage (void)
|
||||
main_loop = g_main_loop_new (NULL, FALSE);
|
||||
frame_clock = clutter_frame_clock_new (refresh_rate,
|
||||
0,
|
||||
NULL,
|
||||
&no_damage_frame_listener_iface,
|
||||
NULL);
|
||||
|
||||
@ -459,6 +463,7 @@ frame_clock_schedule_update_now (void)
|
||||
test.base.main_loop = g_main_loop_new (NULL, FALSE);
|
||||
frame_clock = clutter_frame_clock_new (refresh_rate,
|
||||
0,
|
||||
NULL,
|
||||
&update_now_frame_listener_iface,
|
||||
&test);
|
||||
|
||||
@ -541,6 +546,7 @@ frame_clock_before_frame (void)
|
||||
main_loop = g_main_loop_new (NULL, FALSE);
|
||||
frame_clock = clutter_frame_clock_new (refresh_rate,
|
||||
0,
|
||||
NULL,
|
||||
&before_frame_frame_listener_iface,
|
||||
&expected_frame_count);
|
||||
|
||||
@ -622,6 +628,7 @@ frame_clock_inhibit (void)
|
||||
test.main_loop = g_main_loop_new (NULL, FALSE);
|
||||
test.frame_clock = clutter_frame_clock_new (refresh_rate,
|
||||
0,
|
||||
NULL,
|
||||
&inhibit_frame_listener_iface,
|
||||
&test);
|
||||
|
||||
@ -685,6 +692,7 @@ frame_clock_reschedule_on_idle (void)
|
||||
test.base.main_loop = g_main_loop_new (NULL, FALSE);
|
||||
frame_clock = clutter_frame_clock_new (refresh_rate,
|
||||
0,
|
||||
NULL,
|
||||
&reschedule_on_idle_listener_iface,
|
||||
&test);
|
||||
fake_hw_clock = fake_hw_clock_new (frame_clock, NULL, NULL);
|
||||
@ -722,6 +730,7 @@ frame_clock_destroy_signal (void)
|
||||
|
||||
frame_clock = clutter_frame_clock_new (refresh_rate,
|
||||
0,
|
||||
NULL,
|
||||
&dummy_frame_listener_iface,
|
||||
NULL);
|
||||
|
||||
@ -741,6 +750,7 @@ frame_clock_destroy_signal (void)
|
||||
|
||||
frame_clock = clutter_frame_clock_new (refresh_rate,
|
||||
0,
|
||||
NULL,
|
||||
&dummy_frame_listener_iface,
|
||||
NULL);
|
||||
frame_clock_backup = frame_clock;
|
||||
@ -811,6 +821,7 @@ frame_clock_notify_ready (void)
|
||||
main_loop = g_main_loop_new (NULL, FALSE);
|
||||
frame_clock = clutter_frame_clock_new (refresh_rate,
|
||||
0,
|
||||
NULL,
|
||||
&frame_clock_ready_listener_iface,
|
||||
main_loop);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user