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:
Diffstat (limited to 'source/blender/compositor/intern/COM_BufferOperation.cc')
-rw-r--r--source/blender/compositor/intern/COM_BufferOperation.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/compositor/intern/COM_BufferOperation.cc b/source/blender/compositor/intern/COM_BufferOperation.cc
index e1f566b19db..cafdff89c8e 100644
--- a/source/blender/compositor/intern/COM_BufferOperation.cc
+++ b/source/blender/compositor/intern/COM_BufferOperation.cc
@@ -41,20 +41,32 @@ const float *BufferOperation::get_constant_elem()
return buffer_->getBuffer();
}
+void BufferOperation::initExecution()
+{
+ if (buffer_->is_a_single_elem()) {
+ initMutex();
+ }
+}
+
void *BufferOperation::initializeTileData(rcti * /*rect*/)
{
if (buffer_->is_a_single_elem() == false) {
return buffer_;
}
+ lockMutex();
if (!inflated_buffer_) {
inflated_buffer_ = buffer_->inflate();
}
+ unlockMutex();
return inflated_buffer_;
}
void BufferOperation::deinitExecution()
{
+ if (buffer_->is_a_single_elem()) {
+ deinitMutex();
+ }
delete inflated_buffer_;
}