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:
@@ -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_) {
|
||||
|
||||
Reference in New Issue
Block a user