From 65db108be2548e6668f0eba5329503e4c571d725 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Sat, 22 Feb 2020 00:34:55 +1100 Subject: [PATCH] openglcolorprocessor: renamed CreateOpenGL() to Create() We hide ColorProcessor::Create() to create a derived class rather than the base class and clear up confusion over the two functions existing. --- app/render/backend/opengl/openglcolorprocessor.cpp | 4 ++-- app/render/backend/opengl/openglcolorprocessor.h | 12 ++++++------ app/render/backend/opengl/openglproxy.cpp | 2 +- app/widget/viewer/viewerglwidget.cpp | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/render/backend/opengl/openglcolorprocessor.cpp b/app/render/backend/opengl/openglcolorprocessor.cpp index 5d137664e..e47bbe792 100644 --- a/app/render/backend/opengl/openglcolorprocessor.cpp +++ b/app/render/backend/opengl/openglcolorprocessor.cpp @@ -66,12 +66,12 @@ OpenGLColorProcessor::~OpenGLColorProcessor() ClearTexture(); } -OpenGLColorProcessorPtr OpenGLColorProcessor::CreateOpenGL(OCIO::ConstConfigRcPtr config, const QString &source_space, const QString &dest_space) +OpenGLColorProcessorPtr OpenGLColorProcessor::Create(OCIO::ConstConfigRcPtr config, const QString &source_space, const QString &dest_space) { return std::make_shared(config, source_space, dest_space); } -OpenGLColorProcessorPtr OpenGLColorProcessor::CreateOpenGL(OCIO::ConstConfigRcPtr config, const QString &source_space, const QString &display, const QString &view, const QString &look) +OpenGLColorProcessorPtr OpenGLColorProcessor::Create(OCIO::ConstConfigRcPtr config, const QString &source_space, const QString &display, const QString &view, const QString &look) { return std::make_shared(config, source_space, display, view, look); } diff --git a/app/render/backend/opengl/openglcolorprocessor.h b/app/render/backend/opengl/openglcolorprocessor.h index 894068e5a..898d61fb6 100644 --- a/app/render/backend/opengl/openglcolorprocessor.h +++ b/app/render/backend/opengl/openglcolorprocessor.h @@ -21,13 +21,13 @@ public: ~OpenGLColorProcessor(); - static OpenGLColorProcessorPtr CreateOpenGL(OCIO::ConstConfigRcPtr config, const QString& source_space, const QString& dest_space); + static OpenGLColorProcessorPtr Create(OCIO::ConstConfigRcPtr config, const QString& source_space, const QString& dest_space); - static OpenGLColorProcessorPtr CreateOpenGL(OCIO::ConstConfigRcPtr config, - const QString& source_space, - const QString& display, - const QString& view, - const QString& look); + static OpenGLColorProcessorPtr Create(OCIO::ConstConfigRcPtr config, + const QString& source_space, + const QString& display, + const QString& view, + const QString& look); void Enable(QOpenGLContext* context, bool alpha_is_associated); bool IsEnabled() const; diff --git a/app/render/backend/opengl/openglproxy.cpp b/app/render/backend/opengl/openglproxy.cpp index 0bbf10da5..68aa6abf8 100644 --- a/app/render/backend/opengl/openglproxy.cpp +++ b/app/render/backend/opengl/openglproxy.cpp @@ -58,7 +58,7 @@ void OpenGLProxy::FrameToValue(StreamPtr stream, FramePtr frame, NodeValueTable OpenGLColorProcessorPtr color_processor = std::static_pointer_cast(color_cache_.Get(colorspace_match)); if (!color_processor) { - color_processor = OpenGLColorProcessor::CreateOpenGL(video_stream->footage()->project()->color_manager()->GetConfig(), + color_processor = OpenGLColorProcessor::Create(video_stream->footage()->project()->color_manager()->GetConfig(), video_stream->colorspace(), OCIO::ROLE_SCENE_LINEAR); color_cache_.Add(colorspace_match, color_processor); diff --git a/app/widget/viewer/viewerglwidget.cpp b/app/widget/viewer/viewerglwidget.cpp index 95854f13f..65e5c99ce 100644 --- a/app/widget/viewer/viewerglwidget.cpp +++ b/app/widget/viewer/viewerglwidget.cpp @@ -276,7 +276,7 @@ void ViewerGLWidget::SetupColorProcessor() ocio_view_, ocio_look_); - color_service_ = OpenGLColorProcessor::CreateOpenGL(color_manager_->GetConfig(), + color_service_ = OpenGLColorProcessor::Create(color_manager_->GetConfig(), OCIO::ROLE_SCENE_LINEAR, ocio_display_, ocio_view_,