diff --git a/plugins/scenes/opengl/lanczosfilter.cpp b/plugins/scenes/opengl/lanczosfilter.cpp index c02158dd6..a9a6855b0 100644 --- a/plugins/scenes/opengl/lanczosfilter.cpp +++ b/plugins/scenes/opengl/lanczosfilter.cpp @@ -109,7 +109,7 @@ void LanczosFilter::init() void LanczosFilter::updateOffscreenSurfaces() { - const QSize &s = screens()->size(); + const QSize &s = screens()->size() * 2; int w = s.width(); int h = s.height(); @@ -183,13 +183,13 @@ void LanczosFilter::createOffsets(int count, float width, Qt::Orientation direct void LanczosFilter::performPaint(EffectWindowImpl* w, int mask, QRegion region, WindowPaintData& data) { - if (data.xScale() < 0.9 || data.yScale() < 0.9) { + if (true) { if (!m_inited) init(); const QRect screenRect = Workspace::self()->clientArea(ScreenArea, w->screen(), w->desktop()); // window geometry may not be bigger than screen geometry to fit into the FBO QRect winGeo(w->expandedGeometry()); - if (m_shader && winGeo.width() <= screenRect.width() && winGeo.height() <= screenRect.height()) { + if (m_shader && winGeo.width() <= screenRect.width() * 2&& winGeo.height() <= screenRect.height() * 2) { winGeo.translate(-w->geometry().topLeft()); double left = winGeo.left(); double top = winGeo.top(); @@ -377,6 +377,8 @@ void LanczosFilter::performPaint(EffectWindowImpl* w, int mask, QRegion region, cache->unbind(); w->setData(LanczosCacheRole, QVariant::fromValue(static_cast(cache))); + qDebug() << "Real lanczos"; + // Delete the offscreen surface after 5 seconds m_timer.start(5000, this); return; diff --git a/plugins/scenes/opengl/scene_opengl.cpp b/plugins/scenes/opengl/scene_opengl.cpp index 1d1747f04..e1e170e25 100644 --- a/plugins/scenes/opengl/scene_opengl.cpp +++ b/plugins/scenes/opengl/scene_opengl.cpp @@ -1043,7 +1043,8 @@ void SceneOpenGL2::finalDrawWindow(EffectWindowImpl* w, int mask, QRegion region void SceneOpenGL2::performPaintWindow(EffectWindowImpl* w, int mask, QRegion region, WindowPaintData& data) { - if (mask & PAINT_WINDOW_LANCZOS) { + bool force = w->caption().contains("10000"); + if (mask & PAINT_WINDOW_LANCZOS || force) { if (!m_lanczosFilter) { m_lanczosFilter = new LanczosFilter(this); // reset the lanczos filter when the screen gets resized @@ -1054,6 +1055,7 @@ void SceneOpenGL2::performPaintWindow(EffectWindowImpl* w, int mask, QRegion reg m_lanczosFilter = NULL; }); } + qDebug() << "lanczos!"; m_lanczosFilter->performPaint(w, mask, region, data); } else w->sceneWindow()->performPaint(mask, region, data);