CC: Tweak lanczos filter member

This commit is contained in:
Casian Andrei 2012-08-27 15:53:40 +03:00
parent 34bcf10c51
commit 1fbb413daf
3 changed files with 8 additions and 7 deletions

View file

@ -32,7 +32,6 @@ class Workspace;
class Deleted; class Deleted;
class EffectFrameImpl; class EffectFrameImpl;
class EffectWindowImpl; class EffectWindowImpl;
class LanczosFilter;
class OverlayWindow; class OverlayWindow;
class Shadow; class Shadow;
@ -154,7 +153,6 @@ protected:
QElapsedTimer last_time; QElapsedTimer last_time;
Workspace* wspace; Workspace* wspace;
bool has_waitSync; bool has_waitSync;
QWeakPointer<LanczosFilter> lanczos_filter;
OverlayWindow* m_overlayWindow; OverlayWindow* m_overlayWindow;
}; };

View file

@ -229,13 +229,13 @@ void SceneOpenGL::finalDrawWindow(EffectWindowImpl* w, int mask, QRegion region,
void SceneOpenGL::performPaintWindow(EffectWindowImpl* w, int mask, QRegion region, WindowPaintData& data) void SceneOpenGL::performPaintWindow(EffectWindowImpl* w, int mask, QRegion region, WindowPaintData& data)
{ {
if (mask & PAINT_WINDOW_LANCZOS) { if (mask & PAINT_WINDOW_LANCZOS) {
if (lanczos_filter.isNull()) { if (m_lanczosFilter.isNull()) {
lanczos_filter = new LanczosFilter(this); m_lanczosFilter = new LanczosFilter(this);
// recreate the lanczos filter when the screen gets resized // recreate the lanczos filter when the screen gets resized
connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), lanczos_filter.data(), SLOT(deleteLater())); connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), m_lanczosFilter.data(), SLOT(deleteLater()));
connect(QApplication::desktop(), SIGNAL(resized(int)), lanczos_filter.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 } else
w->sceneWindow()->performPaint(mask, region, data); w->sceneWindow()->performPaint(mask, region, data);
} }

View file

@ -31,6 +31,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
namespace KWin namespace KWin
{ {
class LanczosFilter;
class SceneOpenGL class SceneOpenGL
: public Scene : public Scene
{ {
@ -108,6 +110,7 @@ private:
QElapsedTimer m_renderTimer; QElapsedTimer m_renderTimer;
QRegion m_lastDamage; QRegion m_lastDamage;
int m_lastMask; int m_lastMask;
QWeakPointer<LanczosFilter> m_lanczosFilter;
}; };
class SceneOpenGL::TexturePrivate class SceneOpenGL::TexturePrivate