accleratedjob: simplified function calls
This commit is contained in:
@@ -131,7 +131,7 @@ void ChromaKeyNode::Value(const NodeValueRow &value, const NodeGlobals &globals,
|
||||
if (value[kTextureInput].toTexture() && processor()) {
|
||||
ColorTransformJob job;
|
||||
|
||||
job.InsertValue(value);
|
||||
job.Insert(value);
|
||||
job.SetAlphaChannelRequired(ColorTransformJob::kAlphaForceOn);
|
||||
job.SetColorProcessor(processor());
|
||||
job.SetInputTexture(value[kTextureInput].toTexture());
|
||||
|
||||
@@ -94,11 +94,11 @@ ShaderCode ColorDifferenceKeyNode::GetShaderCode(const ShaderRequest &request) c
|
||||
void ColorDifferenceKeyNode::Value(const NodeValueRow &value, const NodeGlobals &globals, NodeValueTable *table) const
|
||||
{
|
||||
ShaderJob job;
|
||||
job.InsertValue(value);
|
||||
job.Insert(value);
|
||||
job.SetAlphaChannelRequired(GenerateJob::kAlphaForceOn);
|
||||
|
||||
// If there's no texture, no need to run an operation
|
||||
if (job.GetValue(kTextureInput).toTexture()) {
|
||||
if (job.Get(kTextureInput).toTexture()) {
|
||||
table->Push(NodeValue::kTexture, QVariant::fromValue(job), this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,16 +82,16 @@ ShaderCode DespillNode::GetShaderCode(const ShaderRequest &request) const {
|
||||
|
||||
void DespillNode::Value(const NodeValueRow &value, const NodeGlobals &globals, NodeValueTable *table) const {
|
||||
ShaderJob job;
|
||||
job.InsertValue(value);
|
||||
job.Insert(value);
|
||||
|
||||
// Set luma coefficients
|
||||
double luma_coeffs[3] = {0.0f, 0.0f, 0.0f};
|
||||
project()->color_manager()->GetDefaultLumaCoefs(luma_coeffs);
|
||||
job.InsertValue(QStringLiteral("luma_coeffs"),
|
||||
job.Insert(QStringLiteral("luma_coeffs"),
|
||||
NodeValue(NodeValue::kVec3, QVector3D(luma_coeffs[0], luma_coeffs[1], luma_coeffs[2])));
|
||||
|
||||
// If there's no texture, no need to run an operation
|
||||
if (job.GetValue(kTextureInput).toTexture()) {
|
||||
if (job.Get(kTextureInput).toTexture()) {
|
||||
table->Push(NodeValue::kTexture, QVariant::fromValue(job), this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user