diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-10-01 19:08:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-10-01 19:13:50 +0300 |
commit | a513586cd23e14c79f23fe14297bdca78019ec14 (patch) | |
tree | 95da60f3ebd6735b785db1bdd9a9567c89eb5289 /source/blender/editors/space_image | |
parent | 8ce14aa21f45653ab33bdd9e6e20cea3f09fa873 (diff) |
Cleanup: remove ED_image_paint_tile_remove_masks_all
Masks are now temporary, not part of the persistent undo tiles.
Now they're always freed after the stroke.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_undo.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/editors/space_image/image_undo.c b/source/blender/editors/space_image/image_undo.c index 4ac621d34ff..c450d5122eb 100644 --- a/source/blender/editors/space_image/image_undo.c +++ b/source/blender/editors/space_image/image_undo.c @@ -123,6 +123,9 @@ static void ptile_free(PaintTile *ptile) if (ptile->rect.pt) { MEM_freeN(ptile->rect.pt); } + if (ptile->mask) { + MEM_freeN(ptile->mask); + } MEM_freeN(ptile); } @@ -171,14 +174,6 @@ void *ED_image_paint_tile_find(ListBase *paint_tiles, return NULL; } -void ED_image_paint_tile_remove_masks_all(void) -{ - ListBase *paint_tiles = ED_image_paint_tile_list_get(); - for (PaintTile *ptile = paint_tiles->first; ptile; ptile = ptile->next) { - MEM_SAFE_FREE(ptile->mask); - } -} - void *ED_image_paint_tile_push(ListBase *paint_tiles, Image *image, ImBuf *ibuf, |