mirror of
https://github.com/brl/mutter.git
synced 2025-01-23 09:59:03 +00:00
Robert Bragg
02ce77dc08
material: fix copying of material layer differences
This fixes how we copy layer differences in _cogl_material_copy_layer_differences. We were making a redundant g_list_copy of the src differences and then iterating the src list calling _cogl_material_add_layer_difference for each entry which would double the list length, but the initial copy directly referenced the original layers which wasn't correct. Also we were initializing dest->n_layers before copying the layer differences but the act of copying the differences will re-initialize n_layers to 0 when adding the first layer_difference since it will trigger a layer_pre_change_notify and since the dest material isn't yet a STATE_LAYERS authority the state group is initialized before allowing the change.
Description
Languages
C
98.9%
Meson
0.7%
Python
0.3%