diff options
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 3 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_nodes.cc | 12 |
2 files changed, 6 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 817e7bb9685..8a212ed0d7d 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -3610,6 +3610,7 @@ static void image_free_tile(Image *ima, ImageTile *tile) } } } + BKE_image_partial_update_mark_full_update(ima); if (BKE_image_is_multiview(ima)) { const int totviews = BLI_listbase_count(&ima->views); @@ -3950,6 +3951,7 @@ ImageTile *BKE_image_add_tile(struct Image *ima, int tile_number, const char *la } } } + BKE_image_partial_update_mark_full_update(ima); return tile; } @@ -4015,6 +4017,7 @@ void BKE_image_reassign_tile(struct Image *ima, ImageTile *tile, int new_tile_nu } } } + BKE_image_partial_update_mark_full_update(ima); } static int tile_sort_cb(const void *a, const void *b) diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 940c0bfc93c..77597e0db06 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -335,16 +335,10 @@ void DepsgraphNodeBuilder::begin_build() * same as id_orig. Additionally, such ID might have been removed, which makes the check * for whether id_cow is expanded to access freed memory. In order to deal with this we * check whether CoW is needed based on a scalar value which does not lead to access of - * possibly deleted memory. - * Additionally, this saves some space in the map by skipping mapping for datablocks which - * do not need CoW, */ - if (!deg_copy_on_write_is_needed(id_node->id_type)) { - id_node->id_cow = nullptr; - continue; - } - + * possibly deleted memory. */ IDInfo *id_info = (IDInfo *)MEM_mallocN(sizeof(IDInfo), "depsgraph id info"); - if (deg_copy_on_write_is_expanded(id_node->id_cow) && id_node->id_orig != id_node->id_cow) { + if (deg_copy_on_write_is_needed(id_node->id_type) && + deg_copy_on_write_is_expanded(id_node->id_cow) && id_node->id_orig != id_node->id_cow) { id_info->id_cow = id_node->id_cow; } else { |