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
path: root/source
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2021-03-05 17:25:05 +0300
committerJeroen Bakker <jeroen@blender.org>2021-03-05 18:56:14 +0300
commit3d4a844a50744815d234c96dd72af675f478dbe1 (patch)
tree36798c80f49c83a798cb1d2c9b2e3a160984d274 /source
parent8b2fb7aeed5572a815322ac241cd8361321f2376 (diff)
Cleanup: ExecutionSystem::find_output_execution_groups.
Diffstat (limited to 'source')
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystem.cpp29
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystem.h6
2 files changed, 16 insertions, 19 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;
}
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.h b/source/blender/compositor/intern/COM_ExecutionSystem.h
index 8b69caf106f..dd68edd4793 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.h
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.h
@@ -137,8 +137,8 @@ class ExecutionSystem {
/**
* find all execution group with output nodes
*/
- void findOutputExecutionGroup(std::vector<ExecutionGroup *> *result,
- CompositorPriority priority) const;
+ blender::Vector<ExecutionGroup *> find_output_execution_groups(
+ CompositorPriority priority) const;
public:
/**
@@ -181,7 +181,7 @@ class ExecutionSystem {
}
private:
- void executeGroups(CompositorPriority priority);
+ void execute_groups(CompositorPriority priority);
/* allow the DebugInfo class to look at internals */
friend class DebugInfo;