rewrote node data types as or flags

The data types can now be or'd to match broader data types.
This commit is contained in:
itsmattkc
2019-12-04 20:26:43 +11:00
parent bae448fc32
commit 88c3bd44a5
9 changed files with 180 additions and 110 deletions
-12
View File
@@ -22,8 +22,6 @@ QVariant AudioRenderWorker::RenderAsSibling(NodeDependency dep)
// Set working state
working_++;
bool locked = false;
// Firstly we check if this node is a "Block", if it is that means it's part of a linked list of mutually exclusive
// nodes based on time and we might need to locate which Block to attach to
if (node->IsBlock()
@@ -32,20 +30,10 @@ QVariant AudioRenderWorker::RenderAsSibling(NodeDependency dep)
// If the range is not wholly contained in this Block, we'll need to do some extra processing
value = RenderBlock(output, dep.range());
} else {
node->LockProcessing();
value = ProcessNodeNormally(NodeDependency(output, dep.range()));
locked = true;
}
if (!locked) {
node->LockProcessing();
}
// Place the value into the output
output->cache_value(dep.range(), value);
// We're done!
node->UnlockProcessing();
// End this working state
working_--;
+8 -4
View File
@@ -153,15 +153,19 @@ QVariant OpenGLWorker::RunNodeAccelerated(NodeOutput *out)
input_texture_count++;
break;
}
case NodeInput::kAny:
case NodeInput::kSamples:
case NodeInput::kTrack:
case NodeInput::kString:
case NodeInput::kText:
case NodeInput::kRational:
case NodeInput::kBlock:
case NodeInput::kFont:
case NodeInput::kFile:
case NodeInput::kDecimal:
case NodeInput::kWholeNumber:
case NodeInput::kNumber:
case NodeInput::kString:
case NodeInput::kBuffer:
case NodeInput::kVector:
case NodeInput::kNone:
case NodeInput::kAny:
break;
}
}
-7
View File
@@ -266,13 +266,6 @@ void RenderBackend::UpdateNodeInputs()
Node* dst = copied_graph_.nodes().at(i);
Node::CopyInputs(src, dst, false);
// Drop values in range
foreach (NodeParam* p, dst->parameters()) {
if (p->type() == NodeParam::kOutput) {
static_cast<NodeOutput*>(p)->drop_cached_values_overlapping(value_update_range_);
}
}
}
value_update_queued_ = false;
-11
View File
@@ -133,8 +133,6 @@ QVariant VideoRenderWorker::RenderAsSibling(NodeDependency dep)
//qDebug() << "Processing" << original_node->id() << original_node;
original_node->LockProcessing();
// Firstly we check if this node is a "Block", if it is that means it's part of a linked list of mutually exclusive
// nodes based on time and we might need to locate which Block to attach to
if (original_node->IsBlock()) {
@@ -143,10 +141,6 @@ QVariant VideoRenderWorker::RenderAsSibling(NodeDependency dep)
if (original_node != node) {
// Ensure output is the output matching the node as it may have changed
output = static_cast<NodeOutput*>(node->GetParameterWithID(output->id()));
// Switch locks
original_node->UnlockProcessing();
node->LockProcessing();
}
} else {
node = original_node;
@@ -154,12 +148,7 @@ QVariant VideoRenderWorker::RenderAsSibling(NodeDependency dep)
value = ProcessNodeNormally(NodeDependency(output, dep.range()));
// Place the value into the output
output->cache_value(dep.range(), value);
dep.node()->cache_value(dep.range(), value);
// We're done!
node->UnlockProcessing();
// End this working state
working_--;