diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-08-22 17:31:33 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-08-22 17:31:33 +0300 |
commit | 9cfb72ff81a36c26f4b611ec733432968f15a2de (patch) | |
tree | bf7c6af1e2f11bffa681148dd6dff7ca04299b8d /source/blender/blenkernel | |
parent | 831e86d5391e8665d2fd05c7ff58cf08b8d41a54 (diff) | |
parent | 9f40153094bc72c0c4372893f20f9d2aace17049 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_curve.h | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_image.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 11 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 14 |
4 files changed, 14 insertions, 16 deletions
diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h index 1ebb092a939..06bef637107 100644 --- a/source/blender/blenkernel/BKE_curve.h +++ b/source/blender/blenkernel/BKE_curve.h @@ -219,10 +219,6 @@ void BKE_curve_eval_geometry( const struct EvaluationContext *eval_ctx, struct Curve *curve); -void BKE_curve_eval_path( - const struct EvaluationContext *eval_ctx, - struct Curve *curve); - /* Draw Cache */ enum { BKE_CURVE_BATCH_DIRTY_ALL = 0, diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h index 3f8be511212..3c716f39dd0 100644 --- a/source/blender/blenkernel/BKE_image.h +++ b/source/blender/blenkernel/BKE_image.h @@ -58,6 +58,7 @@ void BKE_images_exit(void); void BKE_image_free_packedfiles(struct Image *image); void BKE_image_free_views(struct Image *image); void BKE_image_free_buffers(struct Image *image); +void BKE_image_free_buffers_ex(struct Image *image, bool do_lock); /* call from library */ void BKE_image_free(struct Image *image); diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 351f443cbc9..88077c3bf4e 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -4686,17 +4686,6 @@ void BKE_curve_eval_geometry(const EvaluationContext *UNUSED(eval_ctx), } } -void BKE_curve_eval_path(const EvaluationContext *UNUSED(eval_ctx), - Curve *curve) -{ - /* TODO(sergey): This will probably need to be a part of - * the modifier stack still. - */ - if (G.debug & G_DEBUG_DEPSGRAPH) { - printf("%s on %s\n", __func__, curve->id.name); - } -} - /* Draw Engine */ void (*BKE_curve_batch_cache_dirty_cb)(Curve *cu, int mode) = NULL; void (*BKE_curve_batch_cache_free_cb)(Curve *cu) = NULL; diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 355aa67a947..711fded8060 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -304,8 +304,11 @@ static void image_free_anims(Image *ima) * Simply free the image data from memory, * on display the image can load again (except for render buffers). */ -void BKE_image_free_buffers(Image *ima) +void BKE_image_free_buffers_ex(Image *ima, bool do_lock) { + if (do_lock) { + BLI_spin_lock(&image_spin); + } image_free_cached_frames(ima); image_free_anims(ima); @@ -324,6 +327,15 @@ void BKE_image_free_buffers(Image *ima) } ima->ok = IMA_OK; + + if (do_lock) { + BLI_spin_unlock(&image_spin); + } +} + +void BKE_image_free_buffers(Image *ima) +{ + BKE_image_free_buffers_ex(ima, false); } /** Free (or release) any data used by this image (does not free the image itself). */ |