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:
authorJeroen Bakker <j.bakker@atmind.nl>2012-06-08 13:17:07 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2012-06-08 13:17:07 +0400
commitde7fe937ff24121ce8c66af902639cd96244a55f (patch)
tree625821742e2a136e10fe1cd76a81303766b8633f /source/blender/compositor/intern/COM_ExecutionSystem.cpp
parent95641388471d178552fea26bb477c13536bd58ef (diff)
* Added OpenCL kernel for bokeh blur
* Uncomment COM_OPENCL_ENABLED from COM_defines.h to test
Diffstat (limited to 'source/blender/compositor/intern/COM_ExecutionSystem.cpp')
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystem.cpp40
1 files changed, 26 insertions, 14 deletions
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
index 96d2a6f4434..8c0b37a0685 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
@@ -127,20 +127,9 @@ void ExecutionSystem::execute()
WorkScheduler::start(this->context);
-
- vector<ExecutionGroup*> executionGroups;
- this->findOutputExecutionGroup(&executionGroups);
-
- /* start execution of the ExecutionGroups based on priority of their output node */
- for (int priority = 9 ; priority>=0 ; priority--) {
- for (index = 0 ; index < executionGroups.size(); index ++) {
- ExecutionGroup *group = executionGroups[index];
- NodeOperation *output = group->getOutputNodeOperation();
- if (output->getRenderPriority() == priority) {
- group->execute(this);
- }
- }
- }
+ executeGroups(COM_PRIORITY_HIGH);
+ executeGroups(COM_PRIORITY_MEDIUM);
+ executeGroups(COM_PRIORITY_LOW);
WorkScheduler::finish();
WorkScheduler::stop();
@@ -155,6 +144,18 @@ void ExecutionSystem::execute()
}
}
+void ExecutionSystem::executeGroups(CompositorPriority priority)
+{
+ int index;
+ vector<ExecutionGroup*> executionGroups;
+ this->findOutputExecutionGroup(&executionGroups, priority);
+
+ for (index = 0 ; index < executionGroups.size(); index ++) {
+ ExecutionGroup *group = executionGroups[index];
+ group->execute(this);
+ }
+}
+
void ExecutionSystem::addOperation(NodeOperation *operation)
{
ExecutionSystemHelper::addOperation(this->operations, operation);
@@ -304,6 +305,17 @@ void ExecutionSystem::determineActualSocketDataTypes(vector<NodeBase*> &nodes)
}
}
+void ExecutionSystem::findOutputExecutionGroup(vector<ExecutionGroup*> *result, CompositorPriority priority) const
+{
+ unsigned int index;
+ for (index = 0 ; index < this->groups.size() ; index ++) {
+ ExecutionGroup *group = this->groups[index];
+ if (group->isOutputExecutionGroup() && group->getRenderPriotrity() == priority) {
+ result->push_back(group);
+ }
+ }
+}
+
void ExecutionSystem::findOutputExecutionGroup(vector<ExecutionGroup*> *result) const
{
unsigned int index;