[gtk/matthiasc/for-master: 3/8] gdk: Add a profiler mark for paint_idle
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 3/8] gdk: Add a profiler mark for paint_idle
- Date: Thu, 23 Jan 2020 04:44:55 +0000 (UTC)
commit 59a31e05bc0d07d118f0a0be02b5ce89659b9968
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jan 22 21:27:59 2020 -0500
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.
gdk/gdkframeclockidle.c | 4 ++++
1 file changed, 4 insertions(+)
---
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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]