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')
-rw-r--r--source/blender/compositor/intern/COM_CPUDevice.h3
-rw-r--r--source/blender/compositor/intern/COM_CompositorContext.h4
-rw-r--r--source/blender/compositor/intern/COM_Converter.h6
-rw-r--r--source/blender/compositor/intern/COM_Debug.cpp8
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.cpp6
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.h23
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystem.h55
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.h3
-rw-r--r--source/blender/compositor/intern/COM_Node.h3
-rw-r--r--source/blender/compositor/intern/COM_NodeGraph.cpp3
-rw-r--r--source/blender/compositor/intern/COM_NodeOperation.h30
-rw-r--r--source/blender/compositor/intern/COM_NodeOperationBuilder.cpp2
-rw-r--r--source/blender/compositor/intern/COM_WorkScheduler.cpp3
-rw-r--r--source/blender/compositor/intern/COM_WorkScheduler.h7
14 files changed, 97 insertions, 59 deletions
diff --git a/source/blender/compositor/intern/COM_CPUDevice.h b/source/blender/compositor/intern/COM_CPUDevice.h
index d82046a729f..1d411569146 100644
--- a/source/blender/compositor/intern/COM_CPUDevice.h
+++ b/source/blender/compositor/intern/COM_CPUDevice.h
@@ -23,7 +23,8 @@
/**
* \brief class representing a CPU device.
- * \note for every hardware thread in the system a CPUDevice instance will exist in the workscheduler
+ * \note for every hardware thread in the system a CPUDevice instance
+ * will exist in the workscheduler.
*/
class CPUDevice : public Device {
public:
diff --git a/source/blender/compositor/intern/COM_CompositorContext.h b/source/blender/compositor/intern/COM_CompositorContext.h
index 466779ec9bd..f4cd60e3ee0 100644
--- a/source/blender/compositor/intern/COM_CompositorContext.h
+++ b/source/blender/compositor/intern/COM_CompositorContext.h
@@ -33,8 +33,8 @@
class CompositorContext {
private:
/**
- * \brief The rendering field describes if we are rendering (F12) or if we are editing (Node editor)
- * This field is initialized in ExecutionSystem and must only be read from that point on.
+ * \brief The rendering field describes if we are rendering (F12) or if we are editing (Node
+ * editor) This field is initialized in ExecutionSystem and must only be read from that point on.
* \see ExecutionSystem
*/
bool m_rendering;
diff --git a/source/blender/compositor/intern/COM_Converter.h b/source/blender/compositor/intern/COM_Converter.h
index 0d7fc40de17..1213246b9c9 100644
--- a/source/blender/compositor/intern/COM_Converter.h
+++ b/source/blender/compositor/intern/COM_Converter.h
@@ -41,7 +41,8 @@ class Converter {
*
* 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.
+ * \note When adding a new node to blender, this method needs to be changed to return the correct
+ * Node instance.
*
* \see Node
*/
@@ -55,7 +56,8 @@ class Converter {
static bool is_fast_node(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.
+ * \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.
*
diff --git a/source/blender/compositor/intern/COM_Debug.cpp b/source/blender/compositor/intern/COM_Debug.cpp
index 8632b7ad0f0..72c1e0cf316 100644
--- a/source/blender/compositor/intern/COM_Debug.cpp
+++ b/source/blender/compositor/intern/COM_Debug.cpp
@@ -367,8 +367,12 @@ bool DebugInfo::graphviz_system(const ExecutionSystem *system, char *str, int ma
system, operation, group, str + len, maxlen > len ? maxlen - len : 0);
}
- // len += snprintf(str+len, maxlen>len ? maxlen-len : 0, "// OUTPUTOPERATION: %p\r\n", group->getOutputOperation());
- // len += snprintf(str+len, maxlen>len ? maxlen-len : 0, " O_%p\r\n", group->getOutputOperation());
+ // len += snprintf(str+len,
+ // maxlen>len ? maxlen-len : 0,
+ // "// OUTPUTOPERATION: %p\r\n", group->getOutputOperation());
+ // len += snprintf(
+ // str+len, maxlen>len ? maxlen-len : 0,
+ // " O_%p\r\n", group->getOutputOperation());
len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "}\r\n");
}
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
index 367362c2c66..1718722e860 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
@@ -86,7 +86,8 @@ bool ExecutionGroup::canContainOperation(NodeOperation *operation)
if (m_complex) {
return false;
}
- /* complex ops can't be added to other groups (except their own, which they initialize, see above) */
+ /* complex ops can't be added to other groups (except their own, which they initialize, see
+ * above) */
if (operation->isComplex()) {
return false;
}
@@ -188,7 +189,8 @@ void ExecutionGroup::determineNumberOfChunks()
}
/**
- * this method is called for the top execution groups. containing the compositor node or the preview node or the viewer node)
+ * this method is called for the top execution groups. containing the compositor node or the
+ * preview node or the viewer node)
*/
void ExecutionGroup::execute(ExecutionSystem *graph)
{
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.h b/source/blender/compositor/intern/COM_ExecutionGroup.h
index ff9ac5d0582..41ae6f1c5b2 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.h
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.h
@@ -55,7 +55,8 @@ typedef enum ChunkExecutionState {
/**
* \brief Class ExecutionGroup is a group of Operations that are executed as one.
- * This grouping is used to combine Operations that can be executed as one whole when multi-processing.
+ * This grouping is used to combine Operations that can be executed as one whole when
+ * multi-processing.
* \ingroup Execution
*/
class ExecutionGroup {
@@ -72,7 +73,8 @@ class ExecutionGroup {
/**
* \brief is this ExecutionGroup an input ExecutionGroup
- * an input execution group is a group that is at the end of the calculation (the output is important for the user)
+ * an input execution group is a group that is at the end of the calculation
+ * (the output is important for the user).
*/
int m_isOutput;
@@ -134,8 +136,9 @@ class ExecutionGroup {
Operations m_cachedReadOperations;
/**
- * \brief reference to the original bNodeTree, this field is only set for the 'top' execution group.
- * \note can only be used to call the callbacks for progress, status and break
+ * \brief reference to the original bNodeTree,
+ * this field is only set for the 'top' execution group.
+ * \note can only be used to call the callbacks for progress, status and break.
*/
const bNodeTree *m_bTree;
@@ -154,7 +157,8 @@ class ExecutionGroup {
/**
* \brief indicator when this ExecutionGroup has valid Operations in its vector for Execution
- * \note When building the ExecutionGroup Operations are added via recursion. First a WriteBufferOperations is added, then the
+ * \note When building the ExecutionGroup Operations are added via recursion.
+ * First a WriteBufferOperations is added, then the.
* \note Operation containing the settings that is important for the ExecutiongGroup is added,
* \note When this occurs, these settings are copied over from the node to the ExecutionGroup
* \note and the Initialized flag is set to true.
@@ -204,7 +208,8 @@ class ExecutionGroup {
/**
* \brief try to schedule a specific chunk.
- * \note scheduling succeeds when all input requirements are met and the chunks hasn't been scheduled yet.
+ * \note scheduling succeeds when all input requirements are met and the chunks hasn't been
+ * scheduled yet.
* \param graph:
* \param xChunk:
* \param yChunk:
@@ -375,9 +380,11 @@ class ExecutionGroup {
/**
* \brief schedule an ExecutionGroup
- * \note this method will return when all chunks have been calculated, or the execution has breaked (by user)
+ * \note this method will return when all chunks have been calculated, or the execution has
+ * breaked (by user)
*
- * first the order of the chunks will be determined. This is determined by finding the ViewerOperation and get the relevant information from it.
+ * first the order of the chunks will be determined. This is determined by finding the
+ * ViewerOperation and get the relevant information from it.
* - ChunkOrdering
* - CenterX
* - CenterY
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.h b/source/blender/compositor/intern/COM_ExecutionSystem.h
index 55c2ed6c22b..009b1fb28cd 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.h
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.h
@@ -30,12 +30,13 @@ class ExecutionGroup;
/**
* \page execution Execution model
- * In order to get to an efficient model for execution, several steps are being done. these steps are explained below.
+ * In order to get to an efficient model for execution, several steps are being done. these steps
+ * are explained below.
*
* \section EM_Step1 Step 1: translating blender node system to the new compsitor system
- * Blenders node structure is based on C structs (DNA). These structs are not efficient in the new architecture.
- * We want to use classes in order to simplify the system.
- * during this step the blender node_tree is evaluated and converted to a CPP node system.
+ * Blenders node structure is based on C structs (DNA). These structs are not efficient in the new
+ * architecture. We want to use classes in order to simplify the system. during this step the
+ * blender node_tree is evaluated and converted to a CPP node system.
*
* \see ExecutionSystem
* \see Converter.convert
@@ -43,35 +44,41 @@ class ExecutionGroup;
*
* \section EM_Step2 Step2: translating nodes to operations
* Ungrouping the GroupNodes. Group nodes are node_tree's in node_tree's.
- * The new system only supports a single level of node_tree. We will 'flatten' the system in a single level.
+ * The new system only supports a single level of node_tree.
+ * We will 'flatten' the system in a single level.
* \see GroupNode
* \see ExecutionSystemHelper.ungroup
*
- * Every node has the ability to convert itself to operations. The node itself is responsible to create a correct
- * NodeOperation setup based on its internal settings.
- * Most Node only need to convert it to its NodeOperation. Like a ColorToBWNode doesn't check anything,
- * but replaces itself with a ConvertColorToBWOperation.
- * More complex nodes can use different NodeOperation based on settings; like MixNode.
- * based on the selected Mixtype a different operation will be used.
- * for more information see the page about creating new Nodes. [@subpage newnode]
+ * Every node has the ability to convert itself to operations. The node itself is responsible to
+ * create a correct NodeOperation setup based on its internal settings. Most Node only need to
+ * convert it to its NodeOperation. Like a ColorToBWNode doesn't check anything, but replaces
+ * itself with a ConvertColorToBWOperation. More complex nodes can use different NodeOperation
+ * based on settings; like MixNode. based on the selected Mixtype a different operation will be
+ * used. for more information see the page about creating new Nodes. [@subpage newnode]
*
* \see ExecutionSystem.convertToOperations
* \see Node.convertToOperations
* \see NodeOperation base class for all operations in the system
*
* \section EM_Step3 Step3: add additional conversions to the operation system
- * - Data type conversions: the system has 3 data types COM_DT_VALUE, COM_DT_VECTOR, COM_DT_COLOR.
- * The user can connect a Value socket to a color socket.
- * As values are ordered differently than colors a conversion happens.
+ * - Data type conversions: the system has 3 data types COM_DT_VALUE, COM_DT_VECTOR,
+ * COM_DT_COLOR. The user can connect a Value socket to a color socket. As values are ordered
+ * differently than colors a conversion happens.
*
* - Image size conversions: the system can automatically convert when resolutions do not match.
* An NodeInput has a resize mode. This can be any of the following settings.
- * - [@ref InputSocketResizeMode.COM_SC_CENTER]: The center of both images are aligned
- * - [@ref InputSocketResizeMode.COM_SC_FIT_WIDTH]: The width of both images are aligned
- * - [@ref InputSocketResizeMode.COM_SC_FIT_HEIGHT]: the height of both images are aligned
- * - [@ref InputSocketResizeMode.COM_SC_FIT]: The width, or the height of both images are aligned to make sure that it fits.
- * - [@ref InputSocketResizeMode.COM_SC_STRETCH]: The width and the height of both images are aligned
- * - [@ref InputSocketResizeMode.COM_SC_NO_RESIZE]: bottom left of the images are aligned.
+ * - [@ref InputSocketResizeMode.COM_SC_CENTER]:
+ * The center of both images are aligned
+ * - [@ref InputSocketResizeMode.COM_SC_FIT_WIDTH]:
+ * The width of both images are aligned
+ * - [@ref InputSocketResizeMode.COM_SC_FIT_HEIGHT]:
+ * The height of both images are aligned
+ * - [@ref InputSocketResizeMode.COM_SC_FIT]:
+ * The width, or the height of both images are aligned to make sure that it fits.
+ * - [@ref InputSocketResizeMode.COM_SC_STRETCH]:
+ * The width and the height of both images are aligned.
+ * - [@ref InputSocketResizeMode.COM_SC_NO_RESIZE]:
+ * Bottom left of the images are aligned.
*
* \see Converter.convertDataType Datatype conversions
* \see Converter.convertResolution Image size conversions
@@ -79,8 +86,8 @@ class ExecutionGroup;
* \section EM_Step4 Step4: group operations in executions groups
* ExecutionGroup are groups of operations that are calculated as being one bigger operation.
* All operations will be part of an ExecutionGroup.
- * Complex nodes will be added to separate groups. Between ExecutionGroup's the data will be stored in MemoryBuffers.
- * ReadBufferOperations and WriteBufferOperations are added where needed.
+ * Complex nodes will be added to separate groups. Between ExecutionGroup's the data will be stored
+ * in MemoryBuffers. ReadBufferOperations and WriteBufferOperations are added where needed.
*
* <pre>
*
@@ -127,7 +134,7 @@ class ExecutionSystem {
*/
Groups m_groups;
- private: //methods
+ private: // methods
/**
* find all execution group with output nodes
*/
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.h b/source/blender/compositor/intern/COM_MemoryBuffer.h
index 01a8a86bb15..df936818f33 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.h
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.h
@@ -35,7 +35,8 @@ extern "C" {
* \ingroup Memory
*/
typedef enum MemoryBufferState {
- /** \brief memory has been allocated on creator device and CPU machine, but kernel has not been executed */
+ /** \brief memory has been allocated on creator device and CPU machine,
+ * but kernel has not been executed */
COM_MB_ALLOCATED = 1,
/** \brief memory is available for use, content has been created */
COM_MB_AVAILABLE = 2,
diff --git a/source/blender/compositor/intern/COM_Node.h b/source/blender/compositor/intern/COM_Node.h
index 9bacf271283..c26f6cdfb8b 100644
--- a/source/blender/compositor/intern/COM_Node.h
+++ b/source/blender/compositor/intern/COM_Node.h
@@ -112,7 +112,8 @@ class Node {
/**
* \brief set the reference to the bNode
- * \note used in Node instances to receive the storage/settings and complex node for highlight during execution
+ * \note used in Node instances to receive the storage/settings and complex
+ * node for highlight during execution.
* \param bNode:
*/
void setbNode(bNode *node)
diff --git a/source/blender/compositor/intern/COM_NodeGraph.cpp b/source/blender/compositor/intern/COM_NodeGraph.cpp
index 39dc946f3bc..4104886bc1b 100644
--- a/source/blender/compositor/intern/COM_NodeGraph.cpp
+++ b/source/blender/compositor/intern/COM_NodeGraph.cpp
@@ -303,7 +303,8 @@ void NodeGraph::add_proxies_group(const CompositorContext &context,
/* missing node group datablock can happen with library linking */
if (!b_group_tree) {
- /* this error case its handled in convertToOperations() so we don't get un-convertred sockets */
+ /* This error case its handled in convertToOperations()
+ * so we don't get un-convertred sockets. */
return;
}
diff --git a/source/blender/compositor/intern/COM_NodeOperation.h b/source/blender/compositor/intern/COM_NodeOperation.h
index 968dc171bd3..af9ed2648c9 100644
--- a/source/blender/compositor/intern/COM_NodeOperation.h
+++ b/source/blender/compositor/intern/COM_NodeOperation.h
@@ -53,17 +53,21 @@ class NodeOperationOutput;
* \ingroup Model
*/
typedef enum InputResizeMode {
- /** \brief Center the input image to the center of the working area of the node, no resizing occurs */
+ /** \brief Center the input image to the center of the working area of the node, no resizing
+ occurs */
COM_SC_CENTER = NS_CR_CENTER,
- /** \brief The bottom left of the input image is the bottom left of the working area of the node, no resizing occurs */
+ /** \brief The bottom left of the input image is the bottom left of the working area of the node,
+ no resizing occurs */
COM_SC_NO_RESIZE = NS_CR_NONE,
/** \brief Fit the width of the input image to the width of the working area of the node */
COM_SC_FIT_WIDTH = NS_CR_FIT_WIDTH,
/** \brief Fit the height of the input image to the height of the working area of the node */
COM_SC_FIT_HEIGHT = NS_CR_FIT_HEIGHT,
- /** \brief Fit the width or the height of the input image to the width or height of the working area of the node, image will be larger than the working area */
+ /** \brief Fit the width or the height of the input image to the width or height of the working
+ area of the node, image will be larger than the working area */
COM_SC_FIT = NS_CR_FIT,
- /** \brief Fit the width and the height of the input image to the width and height of the working area of the node, image will be equally larger than the working area */
+ /** \brief Fit the width and the height of the input image to the width and height of the working
+ area of the node, image will be equally larger than the working area */
COM_SC_STRETCH = NS_CR_STRETCH,
} InputResizeMode;
@@ -158,9 +162,11 @@ class NodeOperation : public SocketReader {
unsigned int preferredResolution[2]);
/**
- * \brief isOutputOperation determines whether this operation is an output of the ExecutionSystem during rendering or editing.
+ * \brief isOutputOperation determines whether this operation is an output of the ExecutionSystem
+ * during rendering or editing.
*
- * Default behavior if not overridden, this operation will not be evaluated as being an output of the ExecutionSystem.
+ * Default behavior if not overridden, this operation will not be evaluated as being an output of
+ * the ExecutionSystem.
*
* \see ExecutionSystem
* \group check
@@ -218,7 +224,8 @@ class NodeOperation : public SocketReader {
}
/**
- * \brief custom handle to add new tasks to the OpenCL command queue in order to execute a chunk on an GPUDevice
+ * \brief custom handle to add new tasks to the OpenCL command queue
+ * in order to execute a chunk on an GPUDevice.
* \ingroup execution
* \param context: the OpenCL context
* \param program: the OpenCL program containing all compositor kernels
@@ -226,8 +233,10 @@ class NodeOperation : public SocketReader {
* \param outputMemoryBuffer: the allocated memory buffer in main CPU memory
* \param clOutputBuffer: the allocated memory buffer in OpenCLDevice memory
* \param inputMemoryBuffers: all input MemoryBuffer's needed
- * \param clMemToCleanUp: all created cl_mem references must be added to this list. Framework will clean this after execution
- * \param clKernelsToCleanUp: all created cl_kernel references must be added to this list. Framework will clean this after execution
+ * \param clMemToCleanUp: all created cl_mem references must be added to this list.
+ * Framework will clean this after execution
+ * \param clKernelsToCleanUp: all created cl_kernel references must be added to this list.
+ * Framework will clean this after execution
*/
virtual void executeOpenCL(OpenCLDevice * /*device*/,
MemoryBuffer * /*outputMemoryBuffer*/,
@@ -297,7 +306,8 @@ class NodeOperation : public SocketReader {
/**
* \brief is this operation the active viewer output
- * user can select an ViewerNode to be active (the result of this node will be drawn on the backdrop)
+ * user can select an ViewerNode to be active
+ * (the result of this node will be drawn on the backdrop).
* \return [true:false]
* \see BaseViewerOperation
*/
diff --git a/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp b/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp
index 853e0e768d3..2b17fc0e5f7 100644
--- a/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp
+++ b/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp
@@ -84,7 +84,7 @@ void NodeOperationBuilder::convertToOperations(ExecutionSystem *system)
const OpInputs &op_to_list = find_operation_inputs(inverse_input_map, to);
if (!op_from || op_to_list.empty()) {
/* XXX allow this? error/debug message? */
- //BLI_assert(false);
+ // BLI_assert(false);
/* XXX note: this can happen with certain nodes (e.g. OutputFile)
* which only generate operations in certain circumstances (rendering)
* just let this pass silently for now ...
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp
index c3d1e0cf511..48af823f8f5 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.cpp
+++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp
@@ -58,7 +58,8 @@ static ThreadQueue *g_gpuqueue;
# ifdef COM_OPENCL_ENABLED
static cl_context g_context;
static cl_program g_program;
-/// \brief list of all OpenCLDevices. for every OpenCL GPU device an instance of OpenCLDevice is created
+/// \brief list of all OpenCLDevices. for every OpenCL GPU device an instance of OpenCLDevice is
+/// created
static vector<OpenCLDevice *> g_gpudevices;
/// \brief list of all thread for every GPUDevice in cpudevices a thread exists
static ListBase g_gputhreads;
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.h b/source/blender/compositor/intern/COM_WorkScheduler.h
index 2b523272123..390fde82b61 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.h
+++ b/source/blender/compositor/intern/COM_WorkScheduler.h
@@ -67,9 +67,10 @@ class WorkScheduler {
*
* during initialization the mutexes are initialized.
* there are two mutexes (for every device type one)
- * After mutex initialization the system is queried in order to count the number of CPUDevices and GPUDevices to be created.
- * For every hardware thread a CPUDevice and for every OpenCL GPU device a OpenCLDevice is created.
- * these devices are stored in a separate list (cpudevices & gpudevices)
+ * After mutex initialization the system is queried in order to count the number of CPUDevices
+ * and GPUDevices to be created. For every hardware thread a CPUDevice and for every OpenCL GPU
+ * device a OpenCLDevice is created. these devices are stored in a separate list (cpudevices &
+ * gpudevices)
*
* This function can be called multiple times to lazily initialize OpenCL.
*/