Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-10-01 19:08:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-10-01 19:13:50 +0300
commita513586cd23e14c79f23fe14297bdca78019ec14 (patch)
tree95da60f3ebd6735b785db1bdd9a9567c89eb5289 /source
parent8ce14aa21f45653ab33bdd9e6e20cea3f09fa873 (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')
-rw-r--r--source/blender/editors/include/ED_paint.h1
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_2d.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c2
-rw-r--r--source/blender/editors/space_image/image_undo.c11
4 files changed, 3 insertions, 13 deletions
diff --git a/source/blender/editors/include/ED_paint.h b/source/blender/editors/include/ED_paint.h
index 84f63a5e54b..fec4beea809 100644
--- a/source/blender/editors/include/ED_paint.h
+++ b/source/blender/editors/include/ED_paint.h
@@ -68,7 +68,6 @@ void *ED_image_paint_tile_push(struct ListBase *undo_tiles,
bool **r_valid,
bool use_thread_lock,
bool find_prev);
-void ED_image_paint_tile_remove_masks_all(void);
void ED_image_paint_tile_lock_init(void);
void ED_image_paint_tile_lock_end(void);
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c
index 58ea00d6740..4f1ae10aa62 100644
--- a/source/blender/editors/sculpt_paint/paint_image_2d.c
+++ b/source/blender/editors/sculpt_paint/paint_image_2d.c
@@ -1455,8 +1455,6 @@ static void paint_2d_canvas_free(ImagePaintState *s)
paint_delete_blur_kernel(s->blurkernel);
MEM_freeN(s->blurkernel);
}
-
- ED_image_paint_tile_remove_masks_all();
}
void paint_2d_stroke(void *ps,
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 756374fab96..5e004c7d675 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4536,8 +4536,6 @@ static void project_paint_end(ProjPaintState *ps)
{
int a;
- ED_image_paint_tile_remove_masks_all();
-
/* dereference used image buffers */
if (ps->is_shared_user == false) {
ProjPaintImage *projIma;
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,