nodes: rework so that jobs can be completely deferred
Big optimization requiring a lot of refactoring.
This commit is contained in:
@@ -56,9 +56,9 @@ ShaderCode DipToColorTransition::GetShaderCode(const ShaderRequest &request) con
|
||||
return ShaderCode(FileFunctions::ReadFileAsString(":/shaders/diptoblack.frag"), QString());
|
||||
}
|
||||
|
||||
void DipToColorTransition::ShaderJobEvent(const NodeValueRow &value, ShaderJob &job) const
|
||||
void DipToColorTransition::ShaderJobEvent(const NodeValueRow &value, ShaderJob *job) const
|
||||
{
|
||||
job.Insert(kColorInput, value);
|
||||
job->Insert(kColorInput, value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
static const QString kColorInput;
|
||||
|
||||
protected:
|
||||
virtual void ShaderJobEvent(const NodeValueRow &value, ShaderJob& job) const override;
|
||||
virtual void ShaderJobEvent(const NodeValueRow &value, ShaderJob *job) const override;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -182,10 +182,10 @@ void TransitionBlock::Value(const NodeValueRow &value, const NodeGlobals &global
|
||||
double time = globals.time().in().toDouble();
|
||||
InsertTransitionTimes(&job, time);
|
||||
|
||||
ShaderJobEvent(value, job);
|
||||
ShaderJobEvent(value, &job);
|
||||
|
||||
job_type = NodeValue::kTexture;
|
||||
push_job = QVariant::fromValue(job);
|
||||
push_job = QVariant::fromValue(Texture::Job(globals.vparams(), job));
|
||||
} else if (data_type == NodeValue::kSamples) {
|
||||
// This must be an audio transition
|
||||
SampleBuffer from_samples = out_buffer.toSamples();
|
||||
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
static const QString kCenterInput;
|
||||
|
||||
protected:
|
||||
virtual void ShaderJobEvent(const NodeValueRow &value, ShaderJob& job) const {}
|
||||
virtual void ShaderJobEvent(const NodeValueRow &value, ShaderJob *job) const {}
|
||||
|
||||
virtual void SampleJobEvent(const SampleBuffer &from_samples, const SampleBuffer &to_samples, SampleBuffer &out_samples, double time_in) const {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user