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:
authorManuel Castilla <manzanillawork@gmail.com>2021-07-26 20:36:22 +0300
committerManuel Castilla <manzanillawork@gmail.com>2021-07-26 22:43:30 +0300
commita4a72bffd33a6611de561292ff5a2e004a74867d (patch)
tree157512a2d32b579c044d28830f58e82349680c6a /source/blender/compositor/operations/COM_BoxMaskOperation.h
parente33814ef6baece51cbf9249f4e450eaa4075e707 (diff)
Compositor: Full frame Box Mask node
Adds full frame implementation to this node operation. No functional changes. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D11627
Diffstat (limited to 'source/blender/compositor/operations/COM_BoxMaskOperation.h')
-rw-r--r--source/blender/compositor/operations/COM_BoxMaskOperation.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_BoxMaskOperation.h b/source/blender/compositor/operations/COM_BoxMaskOperation.h
index fdec7bdd8ca..4c48dde844a 100644
--- a/source/blender/compositor/operations/COM_BoxMaskOperation.h
+++ b/source/blender/compositor/operations/COM_BoxMaskOperation.h
@@ -18,12 +18,14 @@
#pragma once
-#include "COM_NodeOperation.h"
+#include "COM_MultiThreadedOperation.h"
namespace blender::compositor {
-class BoxMaskOperation : public NodeOperation {
+class BoxMaskOperation : public MultiThreadedOperation {
private:
+ using MaskFunc = std::function<float(bool is_inside, const float *mask, const float *value)>;
+
/**
* Cached reference to the inputProgram
*/
@@ -64,6 +66,16 @@ class BoxMaskOperation : public NodeOperation {
{
this->m_maskType = maskType;
}
+
+ void update_memory_buffer_partial(MemoryBuffer *output,
+ const rcti &area,
+ Span<MemoryBuffer *> inputs) override;
+
+ private:
+ void apply_mask(MemoryBuffer *output,
+ const rcti &area,
+ Span<MemoryBuffer *> inputs,
+ MaskFunc mask_func);
};
} // namespace blender::compositor