clutter/actor: Don't union child paint volumes if clip is set

When a custom clip is set for an actor, this actor is not going to allow
any painting outside that clip. That includes the children, which may
also not paint outside that clip.

Now in case clip_to_allocation is set to TRUE, we already already do the
right thing and simply use the allocation as our paint volume, ignoring
the volumes of our children. The same should be done for the custom
clip, so also stop the process of building the paint volume once we see
that a custom clip is set and simply use that clip.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1592>
This commit is contained in:
Jonas Dreßler 2020-11-21 11:17:55 +01:00 committed by Marge Bot
parent 3b7137cb35
commit 44563d2932

View File

@ -5736,7 +5736,7 @@ clutter_actor_update_default_paint_volume (ClutterActor *self,
clutter_paint_volume_set_width (volume, priv->clip.size.width);
clutter_paint_volume_set_height (volume, priv->clip.size.height);
res = TRUE;
return TRUE;
}
/* if we don't have children we just bail out here... */