accleratedjob: simplified function calls
This commit is contained in:
@@ -70,9 +70,9 @@ void HistogramScope::DrawScope(TexturePtr managed_tex, QVariant pipeline)
|
||||
|
||||
ShaderJob shader_job;
|
||||
|
||||
shader_job.InsertValue(QStringLiteral("viewport"), NodeValue(NodeValue::kVec2, QVector2D(width(), height())));
|
||||
shader_job.InsertValue(QStringLiteral("histogram_scale"), NodeValue(NodeValue::kFloat, histogram_scale));
|
||||
shader_job.InsertValue(QStringLiteral("histogram_power"), NodeValue(NodeValue::kFloat, histogram_power));
|
||||
shader_job.Insert(QStringLiteral("viewport"), NodeValue(NodeValue::kVec2, QVector2D(width(), height())));
|
||||
shader_job.Insert(QStringLiteral("histogram_scale"), NodeValue(NodeValue::kFloat, histogram_scale));
|
||||
shader_job.Insert(QStringLiteral("histogram_power"), NodeValue(NodeValue::kFloat, histogram_power));
|
||||
|
||||
if (!texture_row_sums_
|
||||
|| texture_row_sums_->width() != this->width()
|
||||
@@ -83,11 +83,11 @@ void HistogramScope::DrawScope(TexturePtr managed_tex, QVariant pipeline)
|
||||
}
|
||||
|
||||
// Draw managed texture to a sums texture
|
||||
shader_job.InsertValue(QStringLiteral("ove_maintex"), NodeValue(NodeValue::kTexture, QVariant::fromValue(managed_tex)));
|
||||
shader_job.Insert(QStringLiteral("ove_maintex"), NodeValue(NodeValue::kTexture, QVariant::fromValue(managed_tex)));
|
||||
renderer()->BlitToTexture(pipeline, shader_job, texture_row_sums_.get());
|
||||
|
||||
// Draw sums into a histogram
|
||||
shader_job.InsertValue(QStringLiteral("ove_maintex"), NodeValue(NodeValue::kTexture, QVariant::fromValue(texture_row_sums_)));
|
||||
shader_job.Insert(QStringLiteral("ove_maintex"), NodeValue(NodeValue::kTexture, QVariant::fromValue(texture_row_sums_)));
|
||||
renderer()->Blit(pipeline_secondary_, shader_job, texture_row_sums_->params());
|
||||
|
||||
// Draw line overlays
|
||||
|
||||
@@ -50,7 +50,7 @@ void ScopeBase::DrawScope(TexturePtr managed_tex, QVariant pipeline)
|
||||
{
|
||||
ShaderJob job;
|
||||
|
||||
job.InsertValue(QStringLiteral("ove_maintex"), NodeValue(NodeValue::kTexture, QVariant::fromValue(managed_tex)));
|
||||
job.Insert(QStringLiteral("ove_maintex"), NodeValue(NodeValue::kTexture, QVariant::fromValue(managed_tex)));
|
||||
|
||||
renderer()->Blit(pipeline, job, VideoParams(width(), height(),
|
||||
static_cast<VideoParams::Format>(OLIVE_CONFIG("OfflinePixelFormat").toInt()),
|
||||
|
||||
@@ -54,22 +54,22 @@ void WaveformScope::DrawScope(TexturePtr managed_tex, QVariant pipeline)
|
||||
ShaderJob job;
|
||||
|
||||
// Set viewport size
|
||||
job.InsertValue(QStringLiteral("viewport"),
|
||||
job.Insert(QStringLiteral("viewport"),
|
||||
NodeValue(NodeValue::kVec2, QVector2D(width(), height())));
|
||||
|
||||
// Set luma coefficients
|
||||
double luma_coeffs[3] = {0.0f, 0.0f, 0.0f};
|
||||
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])));
|
||||
|
||||
|
||||
// Scale of the waveform relative to the viewport surface.
|
||||
job.InsertValue(QStringLiteral("waveform_scale"),
|
||||
job.Insert(QStringLiteral("waveform_scale"),
|
||||
NodeValue(NodeValue::kFloat, waveform_scale));
|
||||
|
||||
// Insert source texture
|
||||
job.InsertValue(QStringLiteral("ove_maintex"),
|
||||
job.Insert(QStringLiteral("ove_maintex"),
|
||||
NodeValue(NodeValue::kTexture, QVariant::fromValue(managed_tex)));
|
||||
|
||||
renderer()->Blit(pipeline, job, VideoParams(width(), height(),
|
||||
|
||||
Reference in New Issue
Block a user