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:
authorJeroen Bakker <jeroen@blender.org>2021-03-05 12:41:45 +0300
committerJeroen Bakker <jeroen@blender.org>2021-03-05 15:46:25 +0300
commitb12be5a872e308ee356b1da96a7f71346618b616 (patch)
tree0ae7f3e1c9e21242452a947b8b62260a5b3161d5 /source/blender/compositor/intern
parentf3fb1df1922a938272a84209c55206255c687e31 (diff)
Cleanup: Remove static struct without data.
Diffstat (limited to 'source/blender/compositor/intern')
-rw-r--r--source/blender/compositor/intern/COM_Converter.cpp14
-rw-r--r--source/blender/compositor/intern/COM_Converter.h78
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystem.h2
-rw-r--r--source/blender/compositor/intern/COM_NodeGraph.cpp4
-rw-r--r--source/blender/compositor/intern/COM_NodeOperationBuilder.cpp4
5 files changed, 41 insertions, 61 deletions
diff --git a/source/blender/compositor/intern/COM_Converter.cpp b/source/blender/compositor/intern/COM_Converter.cpp
index 08035940667..c8ac86ccd5b 100644
--- a/source/blender/compositor/intern/COM_Converter.cpp
+++ b/source/blender/compositor/intern/COM_Converter.cpp
@@ -115,9 +115,9 @@
#include "COM_ViewerNode.h"
#include "COM_ZCombineNode.h"
-bool Converter::is_fast_node(bNode *b_node)
+bool COM_bnode_is_fast_node(const bNode &b_node)
{
- return !ELEM(b_node->type,
+ return !ELEM(b_node.type,
CMP_NODE_BLUR,
CMP_NODE_VECBLUR,
CMP_NODE_BILATERALBLUR,
@@ -132,7 +132,7 @@ bool Converter::is_fast_node(bNode *b_node)
CMP_NODE_DENOISE);
}
-Node *Converter::convert(bNode *b_node)
+Node *COM_convert_bnode(bNode *b_node)
{
Node *node = nullptr;
@@ -419,7 +419,7 @@ Node *Converter::convert(bNode *b_node)
return node;
}
-NodeOperation *Converter::convertDataType(NodeOperationOutput *from, NodeOperationInput *to)
+NodeOperation *COM_convert_data_type(NodeOperationOutput *from, NodeOperationInput *to)
{
DataType fromDatatype = from->getDataType();
DataType toDatatype = to->getDataType();
@@ -446,9 +446,9 @@ NodeOperation *Converter::convertDataType(NodeOperationOutput *from, NodeOperati
return nullptr;
}
-void Converter::convertResolution(NodeOperationBuilder &builder,
- NodeOperationOutput *fromSocket,
- NodeOperationInput *toSocket)
+void COM_convert_resolution(NodeOperationBuilder &builder,
+ NodeOperationOutput *fromSocket,
+ NodeOperationInput *toSocket)
{
InputResizeMode mode = toSocket->getResizeMode();
diff --git a/source/blender/compositor/intern/COM_Converter.h b/source/blender/compositor/intern/COM_Converter.h
index fe3b8b75ccc..f110cc99c62 100644
--- a/source/blender/compositor/intern/COM_Converter.h
+++ b/source/blender/compositor/intern/COM_Converter.h
@@ -31,56 +31,36 @@ class NodeOperationOutput;
class NodeOperationBuilder;
/**
- * \brief Conversion methods for the compositor
+ * \brief Wraps a bNode in its Node instance.
+ *
+ * For all nodetypes a wrapper class is created.
+ *
+ * \note When adding a new node to blender, this method needs to be changed to return the correct
+ * Node instance.
+ *
+ * \see Node
*/
-class Converter {
- public:
- /**
- * \brief Convert/wraps a bNode in its Node instance.
- *
- * For all nodetypes a wrapper class is created.
- *
- * \note When adding a new node to blender, this method needs to be changed to return the correct
- * Node instance.
- *
- * \see Node
- */
- static Node *convert(bNode *b_node);
-
- /**
- * \brief True if the node is considered 'fast'.
- *
- * Slow nodes will be skipped if fast execution is required.
- */
- static bool is_fast_node(bNode *b_node);
+Node *COM_convert_bnode(bNode *b_node);
- /**
- * \brief This method will add a datetype conversion rule when the to-socket does not support the
- * from-socket actual data type.
- *
- * \note this method is called when conversion is needed.
- *
- * \param link: the NodeLink what needs conversion
- * \param system: the ExecutionSystem to add the conversion to.
- * \see NodeLink - a link between two sockets
- */
- static NodeOperation *convertDataType(NodeOperationOutput *from, NodeOperationInput *to);
+/**
+ * \brief True if the node is considered 'fast'.
+ *
+ * Slow nodes will be skipped if fast execution is required.
+ */
+bool COM_bnode_is_fast_node(const bNode &b_node);
- /**
- * \brief This method will add a resolution rule based on the settings of the NodeInput.
- *
- * \note Conversion logic is implemented in this method
- * \see InputSocketResizeMode for the possible conversions.
- *
- * \param link: the NodeLink what needs conversion
- * \param system: the ExecutionSystem to add the conversion to.
- * \see NodeLink - a link between two sockets
- */
- static void convertResolution(NodeOperationBuilder &builder,
- NodeOperationOutput *fromSocket,
- NodeOperationInput *toSocket);
+/**
+ * \brief This function will add a datetype conversion rule when the to-socket does not support the
+ * from-socket actual data type.
+ */
+NodeOperation *COM_convert_data_type(NodeOperationOutput *from, NodeOperationInput *to);
-#ifdef WITH_CXX_GUARDEDALLOC
- MEM_CXX_CLASS_ALLOC_FUNCS("COM:Converter")
-#endif
-};
+/**
+ * \brief This function will add a resolution rule based on the settings of the NodeInput.
+ *
+ * \note Conversion logic is implemented in this function.
+ * \see InputSocketResizeMode for the possible conversions.
+ */
+void COM_convert_resolution(NodeOperationBuilder &builder,
+ NodeOperationOutput *fromSocket,
+ NodeOperationInput *toSocket);
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.h b/source/blender/compositor/intern/COM_ExecutionSystem.h
index 44b47787b06..d03f9b86bb6 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.h
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.h
@@ -79,7 +79,7 @@ class ExecutionGroup;
* - [@ref InputSocketResizeMode.COM_SC_NO_RESIZE]:
* Bottom left of the images are aligned.
*
- * \see Converter.convertDataType Datatype conversions
+ * \see COM_convert_data_type Datatype conversions
* \see Converter.convertResolution Image size conversions
*
* \section EM_Step4 Step4: group operations in executions groups
diff --git a/source/blender/compositor/intern/COM_NodeGraph.cpp b/source/blender/compositor/intern/COM_NodeGraph.cpp
index b604b8ced88..dc5ae52ba8e 100644
--- a/source/blender/compositor/intern/COM_NodeGraph.cpp
+++ b/source/blender/compositor/intern/COM_NodeGraph.cpp
@@ -132,7 +132,7 @@ void NodeGraph::add_bNode(const CompositorContext &context,
}
/* replace slow nodes with proxies for fast execution */
- if (context.isFastCalculation() && !Converter::is_fast_node(b_node)) {
+ if (context.isFastCalculation() && !COM_bnode_is_fast_node(*b_node)) {
add_proxies_skip(b_ntree, b_node, key, is_active_group);
return;
}
@@ -146,7 +146,7 @@ void NodeGraph::add_bNode(const CompositorContext &context,
}
else {
/* regular nodes, handled in Converter */
- Node *node = Converter::convert(b_node);
+ Node *node = COM_convert_bnode(b_node);
if (node) {
add_node(node, b_ntree, key, is_active_group);
}
diff --git a/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp b/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp
index 35a3314db3b..769d1342819 100644
--- a/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp
+++ b/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp
@@ -288,7 +288,7 @@ void NodeOperationBuilder::add_datatype_conversions()
}
for (Links::const_iterator it = convert_links.begin(); it != convert_links.end(); ++it) {
const Link &link = *it;
- NodeOperation *converter = Converter::convertDataType(link.from(), link.to());
+ NodeOperation *converter = COM_convert_data_type(link.from(), link.to());
if (converter) {
addOperation(converter);
@@ -446,7 +446,7 @@ void NodeOperationBuilder::determineResolutions()
}
for (Links::const_iterator it = convert_links.begin(); it != convert_links.end(); ++it) {
const Link &link = *it;
- Converter::convertResolution(*this, link.from(), link.to());
+ COM_convert_resolution(*this, link.from(), link.to());
}
}
}