diff options
Diffstat (limited to 'source/blender/compositor/intern/COM_ExecutionSystem.h')
-rw-r--r-- | source/blender/compositor/intern/COM_ExecutionSystem.h | 49 |
1 files changed, 36 insertions, 13 deletions
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.h b/source/blender/compositor/intern/COM_ExecutionSystem.h index c12380fe839..e106209651c 100644 --- a/source/blender/compositor/intern/COM_ExecutionSystem.h +++ b/source/blender/compositor/intern/COM_ExecutionSystem.h @@ -25,12 +25,15 @@ class ExecutionGroup; #include "COM_ExecutionGroup.h" #include "COM_Node.h" #include "COM_NodeOperation.h" +#include "COM_SharedOperationBuffers.h" #include "DNA_color_types.h" #include "DNA_node_types.h" #include "BLI_vector.hh" +namespace blender::compositor { + /** * \page execution Execution model * In order to get to an efficient model for execution, several steps are being done. these steps @@ -70,17 +73,17 @@ class ExecutionGroup; * * - 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]: + * - [@ref InputSocketResizeMode.ResizeMode::Center]: * The center of both images are aligned - * - [@ref InputSocketResizeMode.COM_SC_FIT_WIDTH]: + * - [@ref InputSocketResizeMode.ResizeMode::FitWidth]: * The width of both images are aligned - * - [@ref InputSocketResizeMode.COM_SC_FIT_HEIGHT]: + * - [@ref InputSocketResizeMode.ResizeMode::FitHeight]: * The height of both images are aligned - * - [@ref InputSocketResizeMode.COM_SC_FIT]: + * - [@ref InputSocketResizeMode.ResizeMode::FitAny]: * The width, or the height of both images are aligned to make sure that it fits. - * - [@ref InputSocketResizeMode.COM_SC_STRETCH]: + * - [@ref InputSocketResizeMode.ResizeMode::Stretch]: * The width and the height of both images are aligned. - * - [@ref InputSocketResizeMode.COM_SC_NO_RESIZE]: + * - [@ref InputSocketResizeMode.ResizeMode::None]: * Bottom left of the images are aligned. * * \see COM_convert_data_type Datatype conversions @@ -113,13 +116,21 @@ class ExecutionGroup; * \see ExecutionGroup class representing the ExecutionGroup */ +/* Forward declarations. */ +class ExecutionModel; + /** * \brief the ExecutionSystem contains the whole compositor tree. */ class ExecutionSystem { - private: /** + * Contains operations active buffers data. Buffers will be disposed once reader operations are + * finished. + */ + SharedOperationBuffers active_buffers_; + + /** * \brief the context used during execution */ CompositorContext m_context; @@ -127,12 +138,17 @@ class ExecutionSystem { /** * \brief vector of operations */ - blender::Vector<NodeOperation *> m_operations; + Vector<NodeOperation *> m_operations; /** * \brief vector of groups */ - blender::Vector<ExecutionGroup *> m_groups; + Vector<ExecutionGroup *> m_groups; + + /** + * Active execution model implementation. + */ + ExecutionModel *execution_model_; private: // methods public: @@ -157,8 +173,8 @@ class ExecutionSystem { */ ~ExecutionSystem(); - void set_operations(const blender::Vector<NodeOperation *> &operations, - const blender::Vector<ExecutionGroup *> &groups); + void set_operations(const Vector<NodeOperation *> &operations, + const Vector<ExecutionGroup *> &groups); /** * \brief execute this system @@ -176,9 +192,14 @@ class ExecutionSystem { return this->m_context; } - private: - void execute_groups(CompositorPriority priority); + SharedOperationBuffers &get_active_buffers() + { + return active_buffers_; + } + void execute_work(const rcti &work_rect, std::function<void(const rcti &split_rect)> work_func); + + private: /* allow the DebugInfo class to look at internals */ friend class DebugInfo; @@ -186,3 +207,5 @@ class ExecutionSystem { MEM_CXX_CLASS_ALLOC_FUNCS("COM:ExecutionSystem") #endif }; + +} // namespace blender::compositor |