From aaf88cd906ff60969cc10ad5e9b2028e17c7c74c Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 16 Nov 2021 10:13:06 +0200 Subject: [PATCH] scenes/opengl: Keep lanczos filter after changing outputs The lanczos filter checks the screen size before rendering in LanczosFilter::updateOffscreenSurfaces(), so this is not needed. This simplifies lifetime handling of the lanczos filter, e.g. we don't need to bother with opengl context anymore, and makes the scene use less Screens' features. --- src/scenes/opengl/scene_opengl.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/scenes/opengl/scene_opengl.cpp b/src/scenes/opengl/scene_opengl.cpp index 2fa83baceb..8b03f0d698 100644 --- a/src/scenes/opengl/scene_opengl.cpp +++ b/src/scenes/opengl/scene_opengl.cpp @@ -585,13 +585,6 @@ void SceneOpenGL::performPaintWindow(EffectWindowImpl* w, int mask, const QRegio if (mask & PAINT_WINDOW_LANCZOS) { if (!m_lanczosFilter) { m_lanczosFilter = new LanczosFilter(this); - // reset the lanczos filter when the screen gets resized - // it will get created next paint - connect(screens(), &Screens::changed, this, [this]() { - makeOpenGLContextCurrent(); - delete m_lanczosFilter; - m_lanczosFilter = nullptr; - }); } m_lanczosFilter->performPaint(w, mask, region, data); } else