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-08-10 16:24:28 +0300
committerManuel Castilla <manzanillawork@gmail.com>2021-08-10 17:16:22 +0300
commit1a9b9dd64df72401df0263ca1e30306e5c675c6d (patch)
treeafee896e361947157cf2e3537ccce5895f5d1c7d /source/blender/compositor/operations/COM_ConstantOperation.h
parent5deb3229a0757e2637163c60d7915888cc50c9d8 (diff)
Compositor: Full frame input nodes
Adds full frame implementation to "Bokeh Image" node, "Track Position" node, `SetVectorOperation` and `MovieClipAttribute`. The other nodes in "Input" submenu are implemented separately. `MovieClipAttribute` needs resolution to calculate its constant value, it can't be constant folded, which requires it to be a `ConstantOperation`. Now `ConstantOperation` contemplate this case and any operation that is always constant without depending on inputs should implement it. If in the future an operation needs to get an input constant element during `determineResolution` it must first determine its input resolution. The nodes have no functional changes. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D12090
Diffstat (limited to 'source/blender/compositor/operations/COM_ConstantOperation.h')
-rw-r--r--source/blender/compositor/operations/COM_ConstantOperation.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_ConstantOperation.h b/source/blender/compositor/operations/COM_ConstantOperation.h
index 2709efeebd8..31b8d30254b 100644
--- a/source/blender/compositor/operations/COM_ConstantOperation.h
+++ b/source/blender/compositor/operations/COM_ConstantOperation.h
@@ -22,15 +22,27 @@
namespace blender::compositor {
+/* TODO(manzanilla): After removing tiled implementation, implement a default #determineResolution
+ * for all constant operations and make all initialization and deinitilization methods final. */
/**
- * Base class for primitive constant operations (Color/Vector/Value). The rest of operations that
- * can be constant are evaluated into primitives during constant folding.
+ * Base class for operations that are always constant. Operations that can be constant only when
+ * all their inputs are so, are evaluated into primitive constants (Color/Vector/Value) during
+ * constant folding.
*/
class ConstantOperation : public NodeOperation {
+ protected:
+ bool needs_resolution_to_get_constant_;
+
public:
ConstantOperation();
+ /** May require resolution to be already determined. */
virtual const float *get_constant_elem() = 0;
+ bool can_get_constant_elem() const;
+
+ void update_memory_buffer(MemoryBuffer *output,
+ const rcti &area,
+ Span<MemoryBuffer *> inputs) final;
};
} // namespace blender::compositor