colormanagement: moved from passing DVL strings everywhere to a consolidated ColorTransform struct

This commit is contained in:
itsmattkc
2020-04-23 01:17:58 +10:00
parent a422f6e369
commit 6c1e90665f
21 changed files with 295 additions and 435 deletions
@@ -71,31 +71,20 @@ void OpenGLColorProcessor::ClearTexture()
}
}
OpenGLColorProcessor::OpenGLColorProcessor(ColorManager* config, const QString &source_space, const QString &dest_space) :
OpenGLColorProcessor::OpenGLColorProcessor(ColorManager* config, const QString &source_space, const ColorTransform &dest_space) :
ColorProcessor(config, source_space, dest_space),
ocio_lut_(0)
{
}
OpenGLColorProcessor::OpenGLColorProcessor(ColorManager* config, const QString &source_space, QString display, QString view, const QString &look, Direction dir) :
ColorProcessor(config, source_space, display, view, look, dir),
ocio_lut_(0)
{
}
OpenGLColorProcessor::~OpenGLColorProcessor()
{
ClearTexture();
}
OpenGLColorProcessorPtr OpenGLColorProcessor::Create(ColorManager *config, const QString &source_space, const QString &dest_space)
OpenGLColorProcessorPtr OpenGLColorProcessor::Create(ColorManager *config, const QString &source_space, const ColorTransform &dest_space)
{
return std::make_shared<OpenGLColorProcessor>(config, source_space, dest_space);
}
OpenGLColorProcessorPtr OpenGLColorProcessor::Create(ColorManager *config, const QString &source_space, const QString &display, const QString &view, const QString &look, Direction dir)
{
return std::make_shared<OpenGLColorProcessor>(config, source_space, display, view, look, dir);
}
OLIVE_NAMESPACE_EXIT
@@ -33,25 +33,15 @@ class OpenGLColorProcessor : public QObject, public ColorProcessor
{
Q_OBJECT
public:
OpenGLColorProcessor(ColorManager *config, const QString &source_space, const QString &dest_space);
OpenGLColorProcessor(ColorManager *config,
const QString& source_space,
QString display,
QString view,
const QString& look,
Direction dir);
const QString& input,
const ColorTransform& dest);
~OpenGLColorProcessor();
static OpenGLColorProcessorPtr Create(ColorManager* config, const QString& source_space, const QString& dest_space);
virtual ~OpenGLColorProcessor() override;
static OpenGLColorProcessorPtr Create(ColorManager* config,
const QString& source_space,
const QString& display,
const QString& view,
const QString& look,
Direction dir = kNormal);
const QString& input,
const ColorTransform& dest);
void Enable(QOpenGLContext* context, bool alpha_is_associated);
bool IsEnabled() const;