CC: Tweak lanczos filter member
This commit is contained in:
parent
34bcf10c51
commit
1fbb413daf
3 changed files with 8 additions and 7 deletions
2
scene.h
2
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<LanczosFilter> lanczos_filter;
|
||||
OverlayWindow* m_overlayWindow;
|
||||
};
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -31,6 +31,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
namespace KWin
|
||||
{
|
||||
|
||||
class LanczosFilter;
|
||||
|
||||
class SceneOpenGL
|
||||
: public Scene
|
||||
{
|
||||
|
@ -108,6 +110,7 @@ private:
|
|||
QElapsedTimer m_renderTimer;
|
||||
QRegion m_lastDamage;
|
||||
int m_lastMask;
|
||||
QWeakPointer<LanczosFilter> m_lanczosFilter;
|
||||
};
|
||||
|
||||
class SceneOpenGL::TexturePrivate
|
||||
|
|
Loading…
Reference in a new issue