[mutter/wip/carlosg/unassorted-perf-fixes: 300/300] Revert "Revert "ClutterActor: Optimize away idempotent scale/position updates""
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/unassorted-perf-fixes: 300/300] Revert "Revert "ClutterActor: Optimize away idempotent scale/position updates""
- Date: Wed, 5 Dec 2018 19:25:17 +0000 (UTC)
commit 77b9e9d2728f7f2a39da5e56c4776564db57ce2f
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Jun 16 14:26:39 2018 +0200
Revert "Revert "ClutterActor: Optimize away idempotent scale/position updates""
This reverts commit 4d2647cdbc6cc2b5a41eb8fcd5183a77819283dd.
A proper fix is now in GTK+, let's reintroduce this optimization.
Related: gtk#844, gtk!294
clutter/clutter/clutter-actor.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 15e29141d..4872c7d71 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -4862,7 +4862,8 @@ clutter_actor_set_scale_factor (ClutterActor *self,
g_assert (pspec != NULL);
g_assert (scale_p != NULL);
- _clutter_actor_create_transition (self, pspec, *scale_p, factor);
+ if (*scale_p != factor)
+ _clutter_actor_create_transition (self, pspec, *scale_p, factor);
}
static inline void
@@ -10301,9 +10302,10 @@ clutter_actor_set_position (ClutterActor *self,
cur_position.x = clutter_actor_get_x (self);
cur_position.y = clutter_actor_get_y (self);
- _clutter_actor_create_transition (self, obj_props[PROP_POSITION],
- &cur_position,
- &new_position);
+ if (!clutter_point_equals (&cur_position, &new_position))
+ _clutter_actor_create_transition (self, obj_props[PROP_POSITION],
+ &cur_position,
+ &new_position);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]