From f219c108bbf1f6acdf2217b1379e83bf54192e3c Mon Sep 17 00:00:00 2001 From: Casian Andrei Date: Sun, 23 Sep 2012 15:32:58 +0300 Subject: [PATCH] CC: Remove unnecessary init/uninit CC methods --- scene_opengl.cpp | 24 ++++++------------------ scene_opengl.h | 2 -- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 84c32c570a..2d42c2d70e 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -429,9 +429,13 @@ bool SceneOpenGL2::supported(OpenGLBackend *backend) SceneOpenGL2::SceneOpenGL2(OpenGLBackend *backend) : SceneOpenGL(Workspace::self(), backend) - , m_colorCorrection(NULL) + , m_colorCorrection(new ColorCorrection(this)) { - initColorCorrection(); // NOTE is this the right place? + // Initialize color correction before the shaders + kDebug(1212) << "Color correction:" << options->isColorCorrected(); + m_colorCorrection->setEnabled(options->isColorCorrected()); + connect(m_colorCorrection, SIGNAL(changed()), Compositor::self(), SLOT(addRepaintFull())); + connect(options, SIGNAL(colorCorrectedChanged()), this, SLOT(slotColorCorrectedChanged())); if (!ShaderManager::instance()->isValid()) { kDebug(1212) << "No Scene Shaders available"; @@ -451,7 +455,6 @@ SceneOpenGL2::SceneOpenGL2(OpenGLBackend *backend) SceneOpenGL2::~SceneOpenGL2() { - uninitColorCorrection(); } void SceneOpenGL2::paintGenericScreen(int mask, ScreenPaintData data) @@ -523,15 +526,6 @@ ColorCorrection *SceneOpenGL2::colorCorrection() return m_colorCorrection; } -void SceneOpenGL2::initColorCorrection() -{ - kDebug(1212) << "Color correction:" << options->isColorCorrected(); - m_colorCorrection = new ColorCorrection(this); - m_colorCorrection->setEnabled(options->isColorCorrected()); - connect(m_colorCorrection, SIGNAL(changed()), Compositor::self(), SLOT(addRepaintFull())); - connect(options, SIGNAL(colorCorrectedChanged()), this, SLOT(slotColorCorrectedChanged())); -} - void SceneOpenGL2::slotColorCorrectedChanged() { m_colorCorrection->setEnabled(options->isColorCorrected()); @@ -541,12 +535,6 @@ void SceneOpenGL2::slotColorCorrectedChanged() ShaderManager::instance(); } -void SceneOpenGL2::uninitColorCorrection() -{ - kDebug(1212); - disconnect(options, SIGNAL(colorCorrectedChanged()), Compositor::self(), SLOT(slotReinitialize())); -} - //**************************************** // SceneOpenGL1 //**************************************** diff --git a/scene_opengl.h b/scene_opengl.h index adeb43e0aa..3ef0baa8cd 100644 --- a/scene_opengl.h +++ b/scene_opengl.h @@ -108,8 +108,6 @@ private Q_SLOTS: void slotColorCorrectedChanged(); private: - void initColorCorrection(); - void uninitColorCorrection(); void performPaintWindow(EffectWindowImpl* w, int mask, QRegion region, WindowPaintData& data); private: