From bc7b1b3a16787bd2f7131579c5b34e7a21e1a510 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 25 Sep 2007 13:22:24 +0000 Subject: [PATCH] 2007-09-25 Ross Burton Merge from stable. * clutter/clutter-group.c: Optimise sort_z_order. --- ChangeLog | 7 +++++++ clutter/clutter-group.c | 10 ++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 77732d901..37ab64e60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-09-25 Ross Burton + + Merge from stable. + + * clutter/clutter-group.c: + Optimise sort_z_order. + 2007-09-17 Emmanuele Bassi Merge from stable diff --git a/clutter/clutter-group.c b/clutter/clutter-group.c index 4868fefa9..6d56459e8 100644 --- a/clutter/clutter-group.c +++ b/clutter/clutter-group.c @@ -404,13 +404,15 @@ static gint sort_z_order (gconstpointer a, gconstpointer b) { - ClutterActor *actor_a = CLUTTER_ACTOR (a); - ClutterActor *actor_b = CLUTTER_ACTOR (b); + int depth_a, depth_b; - if (clutter_actor_get_depth (actor_a) == clutter_actor_get_depth (actor_b)) + depth_a = clutter_actor_get_depth (a); + depth_b = clutter_actor_get_depth (b); + + if (depth_a == depth_b) return 0; - if (clutter_actor_get_depth (actor_a) > clutter_actor_get_depth (actor_b)) + if (depth_a > depth_b) return 1; return -1;