mirror of
https://github.com/brl/mutter.git
synced 2025-02-02 14:53:03 +00:00
Neil Roberts
8f8b05f0e5
cogl-atlas-texture: Don't let textures be destroyed during migration
If an atlas texture's last reference is held by the journal or by the last flushed pipeline then if an atlas migration is started it can cause a crash. This is because the atlas migration will cause a journal flush and can sometimes change the current pipeline which means that the texture would be destroyed during migration. This patch adds an extra 'post_reorganize' callback to the existing 'reorganize' callback (which is now renamed to 'pre_reorganize'). The pre_reorganize callback is now called before the atlas grabs a list of the current textures instead of after so that it doesn't matter if the journal flush destroys some of those textures. The pre_reorganize callback for CoglAtlasTexture grabs a reference to all of the textures so that they can not be destroyed when the migration changes the pipeline. In the post_reorganize callback the reference is removed again. http://bugzilla.clutter-project.org/show_bug.cgi?id=2538
Description
Languages
C
98.9%
Meson
0.7%
Python
0.3%