Bind constraints: Don't force redraws on source relayout

When the source actor potentially changes size, that shouldn't
necessarily result in the target actor being redrawn - it should
be like when a child of a container is reallocated due to changes
in its siblings or parent - it should redraw only to the extent
that it is moved and resized. Privately export an internal function
from clutter-actor.c to allow getting this right.

https://bugzilla.gnome.org/show_bug.cgi?id=719367

Conflicts:
	clutter/clutter-actor.c
This commit is contained in:
Owen W. Taylor 2013-11-22 10:30:21 -05:00
parent 90c05e98a8
commit 0d0248b31f
4 changed files with 4 additions and 5 deletions

View File

@ -309,6 +309,7 @@ void _clutter_actor_detach_clone
ClutterActor *clone); ClutterActor *clone);
void _clutter_actor_queue_redraw_on_clones (ClutterActor *actor); void _clutter_actor_queue_redraw_on_clones (ClutterActor *actor);
void _clutter_actor_queue_relayout_on_clones (ClutterActor *actor); void _clutter_actor_queue_relayout_on_clones (ClutterActor *actor);
void _clutter_actor_queue_only_relayout (ClutterActor *actor);
G_END_DECLS G_END_DECLS

View File

@ -998,8 +998,6 @@ static void clutter_actor_update_map_state (ClutterActor *self,
MapStateChange change); MapStateChange change);
static void clutter_actor_unrealize_not_hiding (ClutterActor *self); static void clutter_actor_unrealize_not_hiding (ClutterActor *self);
static void _clutter_actor_queue_only_relayout (ClutterActor *self);
static void _clutter_actor_get_relative_transformation_matrix (ClutterActor *self, static void _clutter_actor_get_relative_transformation_matrix (ClutterActor *self,
ClutterActor *ancestor, ClutterActor *ancestor,
CoglMatrix *matrix); CoglMatrix *matrix);
@ -7888,7 +7886,7 @@ _clutter_actor_queue_redraw_with_clip (ClutterActor *self,
NULL /* effect */); NULL /* effect */);
} }
static void void
_clutter_actor_queue_only_relayout (ClutterActor *self) _clutter_actor_queue_only_relayout (ClutterActor *self)
{ {
ClutterActorPrivate *priv = self->priv; ClutterActorPrivate *priv = self->priv;

View File

@ -151,7 +151,7 @@ source_queue_relayout (ClutterActor *source,
ClutterBindConstraint *bind) ClutterBindConstraint *bind)
{ {
if (bind->actor != NULL) if (bind->actor != NULL)
clutter_actor_queue_relayout (bind->actor); _clutter_actor_queue_only_relayout (bind->actor);
} }
static void static void

View File

@ -94,7 +94,7 @@ source_queue_relayout (ClutterActor *source,
ClutterSnapConstraint *constraint) ClutterSnapConstraint *constraint)
{ {
if (constraint->actor != NULL) if (constraint->actor != NULL)
clutter_actor_queue_relayout (constraint->actor); _clutter_actor_queue_only_relayout (constraint->actor);
} }
static void static void