mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 08:30:42 -05:00
material: unlink old layer from owner when replacing
In _cogl_material_layer_pre_change_notify when we see that a layer has dependants and it can't be modified directly then we allocate a new layer. In this case we also have to link the new layer to its required owner. If the immutable layer we copied had the same owner though we weren't unlinking that old layer.
This commit is contained in:
parent
021265e634
commit
b493b30257
@ -1451,6 +1451,8 @@ _cogl_material_layer_pre_change_notify (CoglMaterial *required_owner,
|
|||||||
layer->owner != required_owner)
|
layer->owner != required_owner)
|
||||||
{
|
{
|
||||||
CoglMaterialLayer *new = _cogl_material_layer_copy (layer);
|
CoglMaterialLayer *new = _cogl_material_layer_copy (layer);
|
||||||
|
if (layer->owner == required_owner)
|
||||||
|
_cogl_material_remove_layer_difference (required_owner, layer, FALSE);
|
||||||
_cogl_material_add_layer_difference (required_owner, new, FALSE);
|
_cogl_material_add_layer_difference (required_owner, new, FALSE);
|
||||||
cogl_object_unref (new);
|
cogl_object_unref (new);
|
||||||
layer = new;
|
layer = new;
|
||||||
|
Loading…
Reference in New Issue
Block a user