diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 5c4ebea7d78..36cd7e69601 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -273,7 +273,13 @@ void BKE_image_free_buffers(Image *ima) ima->rr = NULL; } - GPU_free_image(ima); + if (!G.background) { + /* Background mode doesn't use opnegl, + * so we can avoid freeing GPU images and save some + * time by skipping mutex lock. + */ + GPU_free_image(ima); + } ima->ok = IMA_OK; } |