mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
3d17e8d590
The priv->paint_volume field of ClutterActor stores the cached paint volume in the actors local coordinate system. It consist of the actors paint volume itself and the union of all children paint volumes. We want to invalidate those cached paint volumes according to the following rules: - If an actors transformation matrix changes, all paint volumes of the parent-tree need to be invalidated (that's because the parent-volumes have unioned the actors paint volume). Our own paint volume does not need invalidation since the transformation matrix is not applied to it. - If an actors allocation-size changes, its own paint volume and all the volumes of the parent-tree need to be invalidated. That's because the allocation-size is used as the size of the paint volume. - If a clip gets set or clip_to_allocation gets enabled for an actor, its own paint volume and all the volumes of the parent-tree need to be invalidated. That's because the clip is factored in when creating the paint volume. So far we did this invalidation in various places and the invalidation up the parent-tree happened inside clutter_actor_real_queue_relayout(). We did not invalidate on changes to the actors transformation matrices and the invalidation in clutter_actor_real_queue_relayout() was more like a "big hammer" that probably invalidated unnecessarily a few times. So introduce proper infrastructure to invalidate those cached paint volumes of actors only in the cases where they actually need to be invalidated. To do that, we reuse the transform_changed() function and introduce a new function queue_update_paint_volume() that invalidates the paint volumes up the actor tree. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1773> |
||
---|---|---|
.. | ||
clutter | ||
.gitignore | ||
meson.build |