[mutter/gbsneto/tracing: 6/7] 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: 6/7] clutter-stage: Also profile size negotiation and allocation
- Date: Fri, 12 Apr 2019 19:35:41 +0000 (UTC)
commit e68fa6c86d87bb13fd40525245c6c8a65e3c6075
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 690dba7fe..e552c8a8e 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]