[mutter/gbsneto/tracing: 27/30] clutter-stage: Also profile size negotiation and allocation
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/tracing: 27/30] clutter-stage: Also profile size negotiation and allocation
- Date: Fri, 17 May 2019 00:54:37 +0000 (UTC)
commit d109f5a11cc7949b3d04b162553419d97c6b96d4
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Sep 10 16:14:42 2018 -0300
clutter-stage: Also profile size negotiation and allocation
To give us a better perspective on how much time is being consumed
by size negotiation and allocation.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/197
clutter/clutter/clutter-stage.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index 14df24b4c..d20fe2b5a 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -1089,12 +1089,15 @@ _clutter_stage_maybe_relayout (ClutterActor *actor)
CLUTTER_NOTE (ACTOR, "Recomputing layout");
CLUTTER_SET_PRIVATE_FLAGS (stage, CLUTTER_IN_RELAYOUT);
+ COGL_TRACE_BEGIN (ClutterStageSizeNegotiation);
natural_width = natural_height = 0;
clutter_actor_get_preferred_size (CLUTTER_ACTOR (stage),
NULL, NULL,
&natural_width, &natural_height);
+ COGL_TRACE_END (ClutterStageSizeNegotiation);
+
box.x1 = 0;
box.y1 = 0;
box.x2 = natural_width;
@@ -1104,9 +1107,13 @@ _clutter_stage_maybe_relayout (ClutterActor *actor)
(int) natural_width,
(int) natural_height);
+ COGL_TRACE_BEGIN (ClutterStageSizeAllocation);
+
clutter_actor_allocate (CLUTTER_ACTOR (stage),
&box, CLUTTER_ALLOCATION_NONE);
+ COGL_TRACE_END (ClutterStageSizeNegotiation);
+
CLUTTER_UNSET_PRIVATE_FLAGS (stage, CLUTTER_IN_RELAYOUT);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]