diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-03-05 17:25:05 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-03-05 18:56:14 +0300 |
commit | 3d4a844a50744815d234c96dd72af675f478dbe1 (patch) | |
tree | 36798c80f49c83a798cb1d2c9b2e3a160984d274 /source/blender/compositor/intern/COM_ExecutionSystem.cpp | |
parent | 8b2fb7aeed5572a815322ac241cd8361321f2376 (diff) |
Cleanup: ExecutionSystem::find_output_execution_groups.
Diffstat (limited to 'source/blender/compositor/intern/COM_ExecutionSystem.cpp')
-rw-r--r-- | source/blender/compositor/intern/COM_ExecutionSystem.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp index 3da2523bfdb..9d6359e9cb3 100644 --- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp +++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp @@ -179,10 +179,10 @@ void ExecutionSystem::execute() WorkScheduler::start(this->m_context); - executeGroups(COM_PRIORITY_HIGH); + execute_groups(COM_PRIORITY_HIGH); if (!this->getContext().isFastCalculation()) { - executeGroups(COM_PRIORITY_MEDIUM); - executeGroups(COM_PRIORITY_LOW); + execute_groups(COM_PRIORITY_MEDIUM); + execute_groups(COM_PRIORITY_LOW); } WorkScheduler::finish(); @@ -199,26 +199,23 @@ void ExecutionSystem::execute() } } -void ExecutionSystem::executeGroups(CompositorPriority priority) +void ExecutionSystem::execute_groups(CompositorPriority priority) { - unsigned int index; - std::vector<ExecutionGroup *> executionGroups; - this->findOutputExecutionGroup(&executionGroups, priority); - - for (index = 0; index < executionGroups.size(); index++) { - ExecutionGroup *group = executionGroups[index]; + blender::Vector<ExecutionGroup *> execution_groups = find_output_execution_groups(priority); + for (ExecutionGroup *group : execution_groups) { group->execute(this); } } -void ExecutionSystem::findOutputExecutionGroup(std::vector<ExecutionGroup *> *result, - CompositorPriority priority) const +blender::Vector<ExecutionGroup *> ExecutionSystem::find_output_execution_groups( + CompositorPriority priority) const { - unsigned int index; - for (index = 0; index < this->m_groups.size(); index++) { - ExecutionGroup *group = this->m_groups[index]; + blender::Vector<ExecutionGroup *> result; + + for (ExecutionGroup *group : m_groups) { if (group->isOutputExecutionGroup() && group->getRenderPriotrity() == priority) { - result->push_back(group); + result.append(group); } } + return result; } |