fixed various caching issues

This commit is contained in:
itsmattkc
2019-09-02 22:58:44 +10:00
parent 3a9af58344
commit 12bc5839a6
19 changed files with 196 additions and 61 deletions
@@ -85,11 +85,20 @@ void RendererProcessThread::ProcessLoop()
NodeOutput* output_to_process = path_.node();
Node* node_to_process = output_to_process->parent();
node_to_process->Lock();
QList<Node*> all_deps = node_to_process->GetDependencies();
foreach (Node* dep, all_deps) {
dep->Lock();
}
// Check hash
QCryptographicHash hasher(QCryptographicHash::Sha1);
node_to_process->Hash(&hasher, output_to_process, path_.time());
hash_ = hasher.result();
texture_ = nullptr;
if (!parent_->HasHash(hash_)) {
QList<NodeDependency> deps = node_to_process->RunDependencies(output_to_process, path_.time());
@@ -106,6 +115,12 @@ void RendererProcessThread::ProcessLoop()
render_instance()->context()->functions()->glFinish();
}
foreach (Node* dep, all_deps) {
dep->Unlock();
}
node_to_process->Unlock();
emit FinishedPath();
}
}