Blender
V3.3
|
the ExecutionSystem contains the whole compositor tree. More...
#include <COM_ExecutionSystem.h>
Public Member Functions | |
ExecutionSystem (RenderData *rd, Scene *scene, bNodeTree *editingtree, bool rendering, bool fastcalculation, const char *view_name) | |
Create a new ExecutionSystem and initialize it with the editingtree. More... | |
~ExecutionSystem () | |
void | set_operations (const Vector< NodeOperation * > &operations, const Vector< ExecutionGroup * > &groups) |
void | execute () |
execute this system More... | |
const CompositorContext & | get_context () const |
get the reference to the compositor context More... | |
SharedOperationBuffers & | get_active_buffers () |
void | execute_work (const rcti &work_rect, std::function< void(const rcti &split_rect)> work_func) |
template<typename TResult > | |
void | execute_work (const rcti &work_rect, std::function< TResult(const rcti &split_rect)> work_func, TResult &join, std::function< void(TResult &join, const TResult &chunk)> reduce_func) |
bool | is_breaked () const |
Friends | |
class | DebugInfo |
the ExecutionSystem contains the whole compositor tree.
Definition at line 114 of file COM_ExecutionSystem.h.
blender::compositor::ExecutionSystem::ExecutionSystem | ( | RenderData * | rd, |
Scene * | scene, | ||
bNodeTree * | editingtree, | ||
bool | rendering, | ||
bool | fastcalculation, | ||
const char * | view_name | ||
) |
Create a new ExecutionSystem and initialize it with the editingtree.
editingtree | [bNodeTree *] |
rendering | [true false] |
Definition at line 21 of file COM_ExecutionSystem.cc.
References BLI_assert_msg, BLI_condition_init(), BLI_mutex_init(), blender::compositor::NodeOperationBuilder::convert_to_operations(), bNodeTree::edit_quality, bNodeTree::flag, blender::compositor::FullFrame, blender::compositor::CompositorContext::get_execution_model(), blender::compositor::WorkScheduler::get_num_cpu_threads(), blender::compositor::WorkScheduler::has_gpu_devices(), NTREE_COM_OPENCL, bNodeTree::previews, bNodeTree::render_quality, scene, blender::compositor::CompositorContext::set_bnodetree(), blender::compositor::CompositorContext::set_fast_calculation(), blender::compositor::CompositorContext::set_preview_hash(), blender::compositor::CompositorContext::set_quality(), blender::compositor::CompositorContext::set_render_data(), blender::compositor::CompositorContext::set_rendering(), blender::compositor::CompositorContext::set_scene(), blender::compositor::CompositorContext::set_view_name(), blender::compositor::CompositorContext::setHasActiveOpenCLDevices(), and blender::compositor::Tiled.
blender::compositor::ExecutionSystem::~ExecutionSystem | ( | ) |
Destructor
Definition at line 68 of file COM_ExecutionSystem.cc.
References BLI_condition_end(), and BLI_mutex_end().
void blender::compositor::ExecutionSystem::execute | ( | ) |
execute this system
Definition at line 93 of file COM_ExecutionSystem.cc.
References blender::compositor::ExecutionModel::execute(), and blender::compositor::DebugInfo::execute_started().
Referenced by COM_execute().
|
inline |
Multi-threaded execution of given work function passing work_rect splits as argument. Once finished, caller thread will call reduce_func for each thread result.
Definition at line 204 of file COM_ExecutionSystem.h.
References atomic_fetch_and_add_int32(), and execute_work().
void blender::compositor::ExecutionSystem::execute_work | ( | const rcti & | work_rect, |
std::function< void(const rcti &split_rect)> | work_func | ||
) |
Multi-threadedly execute given work function passing work_rect splits as argument.
Definition at line 102 of file COM_ExecutionSystem.cc.
References BLI_assert, BLI_condition_notify_one(), BLI_condition_wait(), BLI_mutex_lock(), BLI_mutex_unlock(), BLI_rcti_init(), BLI_rcti_size_y(), blender::compositor::CustomFunction, blender::compositor::WorkPackage::execute_fn, blender::compositor::WorkPackage::executed_fn, blender::compositor::WorkScheduler::finish(), is_breaked(), MIN2, blender::compositor::WorkScheduler::schedule(), blender::compositor::WorkPackage::type, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by blender::compositor::CalculateMeanOperation::calc_mean(), execute_work(), blender::compositor::CalculateStandardDeviationOperation::update_memory_buffer_started(), and blender::compositor::TonemapOperation::update_memory_buffer_started().
|
inline |
Definition at line 189 of file COM_ExecutionSystem.h.
|
inline |
get the reference to the compositor context
Definition at line 184 of file COM_ExecutionSystem.h.
Referenced by blender::compositor::DebugInfo::graphviz_operation(), and blender::compositor::DebugInfo::graphviz_system().
bool blender::compositor::ExecutionSystem::is_breaked | ( | ) | const |
Definition at line 163 of file COM_ExecutionSystem.cc.
References blender::compositor::CompositorContext::get_bnodetree(), bNodeTree::tbh, and bNodeTree::test_break.
Referenced by blender::compositor::ViewerOperation::clear_display_buffer(), execute_work(), and blender::compositor::ViewerOperation::init_execution().
void blender::compositor::ExecutionSystem::set_operations | ( | const Vector< NodeOperation * > & | operations, |
const Vector< ExecutionGroup * > & | groups | ||
) |
Definition at line 86 of file COM_ExecutionSystem.cc.
Referenced by blender::compositor::NodeOperationBuilder::convert_to_operations().
|
friend |
Definition at line 224 of file COM_ExecutionSystem.h.