[gtk/matthiasc/for-master] Add a profiler mark around renderer realization
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master] Add a profiler mark around renderer realization
- Date: Sat, 25 Jan 2020 06:29:21 +0000 (UTC)
commit a29712968548a6036d018e05240e12d26e765581
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jan 25 01:28:24 2020 -0500
Add a profiler mark around renderer realization
This takes time that is worth calling out.
gsk/gl/gskglrenderer.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 65933080c0..99df488159 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -2773,6 +2773,7 @@ gsk_gl_renderer_realize (GskRenderer *renderer,
GError **error)
{
GskGLRenderer *self = GSK_GL_RENDERER (renderer);
+ gint64 before = g_get_monotonic_time ();
/* If we didn't get a GdkGLContext before realization, try creating
* one now, for our exclusive use.
@@ -2802,6 +2803,9 @@ gsk_gl_renderer_realize (GskRenderer *renderer,
self->icon_cache = get_icon_cache_for_display (gdk_surface_get_display (surface), self->atlases);
gsk_gl_shadow_cache_init (&self->shadow_cache);
+ if (gdk_profiler_is_running ())
+ gdk_profiler_add_mark (before * 1000, (g_get_monotonic_time () - before) * 1000, "gl renderer realize",
NULL);
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]