[mutter/gbsneto/tracing: 68/68] clutter-stage: Also profile size negotiation and allocation



commit 447c9b1a6a5efd745ffea5ac22bd3f01395c8fae
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.

 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 425955b56..0d2ef38b5 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -1083,12 +1083,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;
@@ -1098,9 +1101,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]