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:

committed by
Marge Bot

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);
|
||||
|
||||
|
Reference in New Issue
Block a user