more coherent render threading for now

Once again, conceptually this system should work, however it does not seem to
be the most efficient and it wouldn't surprise me if the multithreading was
eventually upgraded to an even more coherent system one day. However for
"core principles" this should be fairly decent.
This commit is contained in:
itsmattkc
2019-11-03 04:05:43 +11:00
parent 9c65cb854b
commit 663ae56ac4
18 changed files with 447 additions and 107 deletions
+21
View File
@@ -135,6 +135,16 @@ void Node::UnlockProcessing()
processing_lock_.unlock();
}
bool Node::IsProcessingLocked()
{
if (processing_lock_.tryLock()) {
processing_lock_.unlock();
return false;
} else {
return true;
}
}
void Node::CopyInputs(Node *source, Node *destination)
{
Q_ASSERT(source->id() == destination->id());
@@ -290,6 +300,17 @@ QString Node::Code(NodeOutput *output)
return QString();
}
NodeParam *Node::GetParameterWithID(const QString &id)
{
foreach (NodeParam* param, params_) {
if (param->id() == id) {
return param;
}
}
return nullptr;
}
bool Node::OutputsTo(Node *n)
{
foreach (NodeParam* param, params_) {