diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-01-22 21:27:59 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-01-22 23:44:01 -0500 |
commit | 59a31e05bc0d07d118f0a0be02b5ce89659b9968 (patch) | |
tree | bc23e8091ec660d04850a104aad775b207785a9d /gdk/gdkframeclockidle.c | |
parent | 527b67af3de79ab2046c937a50aa1f2d2454797a (diff) | |
download | gtk+-59a31e05bc0d07d118f0a0be02b5ce89659b9968.tar.gz |
gdk: Add a profiler mark for paint_idle
This is the big frame clock function where most
signals are emitted, and it can keep us away from
the mainloop for a long time.
Diffstat (limited to 'gdk/gdkframeclockidle.c')
-rw-r--r-- | gdk/gdkframeclockidle.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdk/gdkframeclockidle.c b/gdk/gdkframeclockidle.c index 1d11ae4fe7..29cd57975f 100644 --- a/gdk/gdkframeclockidle.c +++ b/gdk/gdkframeclockidle.c @@ -317,6 +317,7 @@ gdk_frame_clock_paint_idle (void *data) GdkFrameClockIdlePrivate *priv = clock_idle->priv; gboolean skip_to_resume_events; GdkFrameTimings *timings = NULL; + gint64 before = g_get_monotonic_time (); priv->paint_idle_id = 0; priv->in_paint_idle = TRUE; @@ -500,6 +501,9 @@ gdk_frame_clock_paint_idle (void *data) if (priv->freeze_count == 0) priv->sleep_serial = get_sleep_serial (); + if (gdk_profiler_is_running ()) + gdk_profiler_add_mark (before * 1000, (g_get_monotonic_time () - before) * 1000, "frameclock", "paint_idle"); + return FALSE; } |