shifted to new dependency structure
This commit is contained in:
@@ -73,24 +73,34 @@ void RendererProcessor::SetCacheName(const QString &s)
|
||||
GenerateCacheIDInternal();
|
||||
}
|
||||
|
||||
void RendererProcessor::Process()
|
||||
QVariant RendererProcessor::Value(NodeOutput* output, const rational& time)
|
||||
{
|
||||
texture_output_->set_value(0);
|
||||
if (output == texture_output_) {
|
||||
if (!texture_input_->IsConnected()) {
|
||||
// Nothing is connected - nothing to show or render
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!texture_input_->IsConnected()) {
|
||||
// Nothing is connected - nothing to show or render
|
||||
return;
|
||||
if (cache_id_.isEmpty()) {
|
||||
qWarning() << "RendererProcessor has no cache ID";
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (timebase_.isNull()) {
|
||||
qWarning() << "RendererProcessor has no timebase";
|
||||
return 0;
|
||||
}
|
||||
|
||||
// FIXME: Test code only
|
||||
return texture_input_->get_value(time);
|
||||
// End test code
|
||||
}
|
||||
|
||||
if (cache_id_.isEmpty()) {
|
||||
qWarning() << "RendererProcessor has no cache ID";
|
||||
return;
|
||||
}
|
||||
return 0;
|
||||
|
||||
|
||||
|
||||
|
||||
if (timebase_.isNull()) {
|
||||
qWarning() << "RendererProcessor has no timebase";
|
||||
return;
|
||||
}
|
||||
|
||||
// This Renderer node relies on a disk cache so this Process() function should be quite fast. Either it returns the
|
||||
// cached frame or it returns nothing.
|
||||
@@ -252,7 +262,7 @@ void RendererProcessor::CacheNext()
|
||||
Node* node_to_cache = texture_input_->edges().first()->output()->parent();
|
||||
|
||||
// Set graph time
|
||||
node_to_cache->set_time(time_to_cache);
|
||||
//node_to_cache->set_time(time_to_cache);
|
||||
|
||||
// Run this probe in another thread
|
||||
RenderPath path = RendererProbe::ProbeNode(node_to_cache, threads_.size(), time_to_cache);
|
||||
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
NodeOutput* texture_output();
|
||||
|
||||
protected:
|
||||
virtual void Process() override;
|
||||
virtual QVariant Value(NodeOutput* output, const rational& time) override;
|
||||
|
||||
private:
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,12 @@ RenderPath RendererProbe::ProbeNode(Node *node, int thread_count, const rational
|
||||
|
||||
void RendererProbe::TraverseNode(RenderPath& path, Node *node, const rational& time, int thread, int index)
|
||||
{
|
||||
bool can_take_node = true;
|
||||
Q_UNUSED(path)
|
||||
Q_UNUSED(node)
|
||||
Q_UNUSED(time)
|
||||
Q_UNUSED(thread)
|
||||
Q_UNUSED(index)
|
||||
/*bool can_take_node = true;
|
||||
|
||||
if (path.ContainsNode(node) >= 0) {
|
||||
if (path.NodeIndex(node) < index) {
|
||||
@@ -61,7 +66,7 @@ void RendererProbe::TraverseNode(RenderPath& path, Node *node, const rational& t
|
||||
path.AddEntry(node, thread, index);
|
||||
}
|
||||
|
||||
QList<Node*> deps = node->GetImmediateDependenciesAt(time);
|
||||
QList<Node*> deps = node->RunDependencies(nullptr, time);
|
||||
|
||||
// Print debugging information
|
||||
foreach (Node* dep, deps) {
|
||||
@@ -77,5 +82,5 @@ void RendererProbe::TraverseNode(RenderPath& path, Node *node, const rational& t
|
||||
int run_thread = (ideal_thread == -1) ? thread : ideal_thread;
|
||||
|
||||
TraverseNode(path, dep, time, run_thread, next_index);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
@@ -97,9 +97,9 @@ void RendererThread::run()
|
||||
caller_mutex_.unlock();
|
||||
|
||||
// Process the Node
|
||||
for (int i=path_.size()-1;i>=0;i--) {
|
||||
/*for (int i=path_.size()-1;i>=0;i--) {
|
||||
path_.at(i)->Run();
|
||||
}
|
||||
}*/
|
||||
|
||||
emit FinishedPath();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user