Revert "Revert "ClutterActor: Optimize away idempotent scale/position updates""

This reverts commit 4d2647cdbc.

A proper fix is now in GTK+, let's reintroduce this optimization.

Related: gtk#844, gtk!294
This commit is contained in:
Carlos Garnacho 2018-06-16 14:26:39 +02:00
parent 4139907a7e
commit 2e79d05e04

View File

@ -4880,7 +4880,8 @@ clutter_actor_set_scale_factor (ClutterActor *self,
g_assert (pspec != NULL); g_assert (pspec != NULL);
g_assert (scale_p != 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 static inline void
@ -10312,9 +10313,10 @@ clutter_actor_set_position (ClutterActor *self,
cur_position.x = clutter_actor_get_x (self); cur_position.x = clutter_actor_get_x (self);
cur_position.y = clutter_actor_get_y (self); cur_position.y = clutter_actor_get_y (self);
_clutter_actor_create_transition (self, obj_props[PROP_POSITION], if (!clutter_point_equals (&cur_position, &new_position))
&cur_position, _clutter_actor_create_transition (self, obj_props[PROP_POSITION],
&new_position); &cur_position,
&new_position);
} }
/** /**