From 1fbb413dafbd2956c33fbd5a93cbd4fdf1549fe4 Mon Sep 17 00:00:00 2001 From: Casian Andrei Date: Mon, 27 Aug 2012 15:53:40 +0300 Subject: [PATCH] CC: Tweak lanczos filter member --- scene.h | 2 -- scene_opengl.cpp | 10 +++++----- scene_opengl.h | 3 +++ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/scene.h b/scene.h index feb91c7483..032cebcd6d 100644 --- a/scene.h +++ b/scene.h @@ -32,7 +32,6 @@ class Workspace; class Deleted; class EffectFrameImpl; class EffectWindowImpl; -class LanczosFilter; class OverlayWindow; class Shadow; @@ -154,7 +153,6 @@ protected: QElapsedTimer last_time; Workspace* wspace; bool has_waitSync; - QWeakPointer lanczos_filter; OverlayWindow* m_overlayWindow; }; diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 668453a1d7..ce4806b2f1 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -229,13 +229,13 @@ void SceneOpenGL::finalDrawWindow(EffectWindowImpl* w, int mask, QRegion region, void SceneOpenGL::performPaintWindow(EffectWindowImpl* w, int mask, QRegion region, WindowPaintData& data) { if (mask & PAINT_WINDOW_LANCZOS) { - if (lanczos_filter.isNull()) { - lanczos_filter = new LanczosFilter(this); + if (m_lanczosFilter.isNull()) { + m_lanczosFilter = new LanczosFilter(this); // recreate the lanczos filter when the screen gets resized - connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), lanczos_filter.data(), SLOT(deleteLater())); - connect(QApplication::desktop(), SIGNAL(resized(int)), lanczos_filter.data(), SLOT(deleteLater())); + connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), m_lanczosFilter.data(), SLOT(deleteLater())); + connect(QApplication::desktop(), SIGNAL(resized(int)), m_lanczosFilter.data(), SLOT(deleteLater())); } - lanczos_filter.data()->performPaint(w, mask, region, data); + m_lanczosFilter.data()->performPaint(w, mask, region, data); } else w->sceneWindow()->performPaint(mask, region, data); } diff --git a/scene_opengl.h b/scene_opengl.h index b92f40f013..45e5e29507 100644 --- a/scene_opengl.h +++ b/scene_opengl.h @@ -31,6 +31,8 @@ along with this program. If not, see . namespace KWin { +class LanczosFilter; + class SceneOpenGL : public Scene { @@ -108,6 +110,7 @@ private: QElapsedTimer m_renderTimer; QRegion m_lastDamage; int m_lastMask; + QWeakPointer m_lanczosFilter; }; class SceneOpenGL::TexturePrivate