Bug 1415 - short-circuit setting same clip again
There is some GL work and a repaint anytime the clip is set or unset, so avoid that if it isn't really changed. Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
parent
54f4ed775c
commit
9ccae46bc1
@ -5539,6 +5539,13 @@ clutter_actor_set_clipu (ClutterActor *self,
|
||||
|
||||
priv = self->priv;
|
||||
|
||||
if (priv->has_clip &&
|
||||
priv->clip[0] == xoff &&
|
||||
priv->clip[1] == yoff &&
|
||||
priv->clip[2] == width &&
|
||||
priv->clip[3] == height)
|
||||
return;
|
||||
|
||||
priv->clip[0] = xoff;
|
||||
priv->clip[1] = yoff;
|
||||
priv->clip[2] = width;
|
||||
@ -5591,6 +5598,9 @@ clutter_actor_remove_clip (ClutterActor *self)
|
||||
{
|
||||
g_return_if_fail (CLUTTER_IS_ACTOR (self));
|
||||
|
||||
if (!self->priv->has_clip)
|
||||
return;
|
||||
|
||||
self->priv->has_clip = FALSE;
|
||||
|
||||
clutter_actor_queue_redraw (self);
|
||||
|
Loading…
Reference in New Issue
Block a user