mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
6ea0f8facc
For ClutterClones we need to apply a scale to the texture of the clone to ensure the painted texture of the source actor actually fits the allocation of the clone. We're doing this using the transformation matrix instead of using the scale_x/scale_y properties of ClutterActor to allow users to scale ClutterClones using that API independently. Now it's quite a bad idea to get the allocation boxes for calculating that scale using clutter_actor_get_allocation_box(), since that method will internally do an immediate relayout of the stage in case the actor isn't allocated. Another side effect of that approach is that it makes it impossible to invalidate the transform (which will be needed when we start caching those matrices) properly. So since we eventually allocate both the source actor and the clone ourselves anyway, we can simply use the allocation box inside clutter_clone_allocate() (which is definitely updated and valid at that point) to calculate the scale factor. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1181 |
||
---|---|---|
.. | ||
clutter | ||
.gitignore | ||
meson.build |