colortransformjob: allow overriding ID

This commit is contained in:
itsmattkc
2022-05-07 13:28:46 -07:00
parent 0403ad8fce
commit 09d30c6aee
2 changed files with 13 additions and 1 deletions
+12
View File
@@ -45,6 +45,17 @@ public:
clear_destination_ = true;
}
QString id() const
{
if (id_.isEmpty()) {
return processor_->id();
} else {
return id_;
}
}
void SetOverrideID(const QString &id) { id_ = id; }
TexturePtr GetInputTexture() const { return input_texture_; }
void SetInputTexture(TexturePtr tex) { input_texture_ = tex; }
@@ -76,6 +87,7 @@ public:
private:
ColorProcessorPtr processor_;
QString id_;
TexturePtr input_texture_;
+1 -1
View File
@@ -99,7 +99,7 @@ bool Renderer::GetColorContext(const ColorTransformJob &color_job, Renderer::Col
ColorContext& color_ctx = *ctx;
QString proc_id = color_job.GetColorProcessor()->id();
QString proc_id = color_job.id();
if (color_cache_.contains(proc_id)) {
color_ctx = color_cache_.value(proc_id);