colortransformjob: allow overriding ID
This commit is contained in:
@@ -45,6 +45,17 @@ public:
|
|||||||
clear_destination_ = true;
|
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_; }
|
TexturePtr GetInputTexture() const { return input_texture_; }
|
||||||
void SetInputTexture(TexturePtr tex) { input_texture_ = tex; }
|
void SetInputTexture(TexturePtr tex) { input_texture_ = tex; }
|
||||||
|
|
||||||
@@ -76,6 +87,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
ColorProcessorPtr processor_;
|
ColorProcessorPtr processor_;
|
||||||
|
QString id_;
|
||||||
|
|
||||||
TexturePtr input_texture_;
|
TexturePtr input_texture_;
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ bool Renderer::GetColorContext(const ColorTransformJob &color_job, Renderer::Col
|
|||||||
|
|
||||||
ColorContext& color_ctx = *ctx;
|
ColorContext& color_ctx = *ctx;
|
||||||
|
|
||||||
QString proc_id = color_job.GetColorProcessor()->id();
|
QString proc_id = color_job.id();
|
||||||
|
|
||||||
if (color_cache_.contains(proc_id)) {
|
if (color_cache_.contains(proc_id)) {
|
||||||
color_ctx = color_cache_.value(proc_id);
|
color_ctx = color_cache_.value(proc_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user