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
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-10-05 00:31:08 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-10-05 00:31:08 +0400
commit41202e25e781543eaabfa5be90e2de0f1b7f94a8 (patch)
tree67838bef4c850d363bc98d4807300f25914d7cde /source/blender/imbuf/intern/divers.c
parent282f98a84dc7d454a36918b9b8b279aa127c4d3b (diff)
Fix #32763: Image flickering appears if Movie Clip Editor and compositor opened
The issue was caused by compositor was allocating float buffer for image and then this buffer was filled with data converted from byte buffer. If display happens at time between float was allocated and it was filled black areas were appearing on the screen. Made it so IMB_float_from_rect locks color management thread so display transform wouldn't use uninitialized buffer anymore.
Diffstat (limited to 'source/blender/imbuf/intern/divers.c')
-rw-r--r--source/blender/imbuf/intern/divers.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c
index 9ce5d0e30da..aa236af3507 100644
--- a/source/blender/imbuf/intern/divers.c
+++ b/source/blender/imbuf/intern/divers.c
@@ -43,6 +43,8 @@
#include "IMB_colormanagement.h"
#include "IMB_colormanagement_intern.h"
+#include "BLI_threads.h"
+
#include "MEM_guardedalloc.h"
/**************************** Interlace/Deinterlace **************************/
@@ -599,9 +601,18 @@ void IMB_float_from_rect(ImBuf *ibuf)
if (ibuf->rect == NULL)
return;
+ /* lock the color management thread
+ * need this because allocated but not filled float buffer will confuse
+ * display transform which lead to black areas across the frame
+ */
+ BLI_lock_thread(LOCK_COLORMANAGE);
+
if (ibuf->rect_float == NULL) {
- if (imb_addrectfloatImBuf(ibuf) == 0)
+ if (imb_addrectfloatImBuf(ibuf) == 0) {
+ BLI_unlock_thread(LOCK_COLORMANAGE);
+
return;
+ }
}
/* first, create float buffer in non-linear space */
@@ -611,6 +622,8 @@ void IMB_float_from_rect(ImBuf *ibuf)
/* then make float be in linear space */
IMB_colormanagement_colorspace_to_scene_linear(ibuf->rect_float, ibuf->x, ibuf->y, ibuf->channels,
ibuf->rect_colorspace, predivide);
+
+ BLI_unlock_thread(LOCK_COLORMANAGE);
}
/* no profile conversion */