mutter/clutter
Sebastian Keller dfe4d218f1 clutter/actor: Make get_transformed_paint_volume() transfer full
Transfer none was achieved using a stack GArray in the stage which
would get resized to 0 at the end of every frame to "free" it.
In the case of direct scanout however, painting the next frame only
happens after leaving fullscreen again. Until then the array just kept
growing and because GArrays don't reallocate when shrunk, this memory
remained allocated even after leaving fullscreen.

There is no cache benefit from storing paint volumes this way, because
nothing accesses them after their immediate use in the calling code.
Also the reduced overhead from avoiding malloc calls seems negligible as
according to heaptrack this only makes up about 2-3% of the temporary
allocations.

Changing this to transfer full and removing the stack array simplifies
the code and fixes the "leak".

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3191
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3442>
2023-12-06 14:07:39 +00:00
..
clutter clutter/actor: Make get_transformed_paint_volume() transfer full 2023-12-06 14:07:39 +00:00
.gitignore build: One config file to rule them all 2023-11-15 12:00:19 +00:00
meson.build cleanup: Stop allowing deprecated Cogl API usage 2023-11-15 13:13:00 +01:00