diff --git a/effects/blur/blur.h b/effects/blur/blur.h --- a/effects/blur/blur.h +++ b/effects/blur/blur.h @@ -83,7 +83,6 @@ QRegion blurRegion(const EffectWindow *w) const; bool shouldBlur(const EffectWindow *w, int mask, const WindowPaintData &data) const; void updateBlurRegion(EffectWindow *w) const; - void doSimpleBlur(EffectWindow *w, const float opacity, const QMatrix4x4 &screenProjection); void doBlur(const QRegion &shape, const QRect &screen, const float opacity, const QMatrix4x4 &screenProjection, bool isDock); void uploadRegion(QVector2D *&map, const QRegion ®ion, const int downSampleIterations); void uploadGeometry(GLVertexBuffer *vbo, const QRegion &blurRegion, const QRegion &windowRegion); @@ -93,9 +92,6 @@ void copyScreenSampleTexture(GLVertexBuffer *vbo, int blurRectCount, QRegion blurShape, QSize screenSize, QMatrix4x4 screenProjection); private: - GLShader *m_simpleShader; - GLRenderTarget *m_simpleTarget; - BlurShader *m_shader; QVector m_renderTargets; QVector m_renderTextures; @@ -105,7 +101,6 @@ QRegion m_damagedArea; // keeps track of the area which has been damaged (from bottom to top) QRegion m_paintedArea; // actually painted area which is greater than m_damagedArea QRegion m_currentBlur; // keeps track of the currently blured area of the windows(from bottom to top) - bool m_useSimpleBlur; int m_downSampleIterations; // number of times the texture will be downsized to half size int m_offset; diff --git a/effects/blur/blur.cpp b/effects/blur/blur.cpp --- a/effects/blur/blur.cpp +++ b/effects/blur/blur.cpp @@ -43,12 +43,6 @@ { initConfig(); m_shader = BlurShader::create(); - m_simpleShader = ShaderManager::instance()->generateShaderFromResources(ShaderTrait::MapTexture, QString(), QStringLiteral("logout-blur.frag")); - m_simpleTarget = new GLRenderTarget(); - - if (!m_simpleShader->isValid()) { - qCDebug(KWINEFFECTS) << "Simple blur shader failed to load"; - } initBlurStrengthValues(); reconfigure(ReconfigureAll); @@ -87,12 +81,6 @@ { deleteFBOs(); - delete m_simpleTarget; - m_simpleTarget = nullptr; - - delete m_simpleShader; - m_simpleShader = nullptr; - delete m_shader; m_shader = nullptr; } @@ -235,8 +223,6 @@ BlurConfig::self()->read(); - m_useSimpleBlur = BlurConfig::useSimpleBlur(); - int blurStrength = BlurConfig::blurStrength() - 1; m_downSampleIterations = blurStrengthValues[blurStrength].iteration; m_offset = blurStrengthValues[blurStrength].offset; @@ -564,16 +550,7 @@ } if (!shape.isEmpty()) { - if (m_useSimpleBlur && - w->isFullScreen() && - GLRenderTarget::blitSupported() && - m_simpleShader->isValid() && - !GLPlatform::instance()->supports(LimitedNPOT) && - shape.boundingRect() == w->geometry()) { - doSimpleBlur(w, data.opacity(), data.screenProjectionMatrix()); - } else { - doBlur(shape, screen, data.opacity(), data.screenProjectionMatrix(), w->isDock()); - } + doBlur(shape, screen, data.opacity(), data.screenProjectionMatrix(), w->isDock()); } } @@ -594,32 +571,6 @@ effects->paintEffectFrame(frame, region, opacity, frameOpacity); } -void BlurEffect::doSimpleBlur(EffectWindow *w, const float opacity, const QMatrix4x4 &screenProjection) -{ - // The fragment shader uses a LOD bias of 1.75, so we need 3 mipmap levels. - GLTexture blurTexture = GLTexture(GL_RGBA8, w->size(), 3); - blurTexture.setFilter(GL_LINEAR_MIPMAP_LINEAR); - blurTexture.setWrapMode(GL_CLAMP_TO_EDGE); - - m_simpleTarget->attachTexture(blurTexture); - m_simpleTarget->blitFromFramebuffer(w->geometry(), QRect(QPoint(0, 0), w->size())); - m_simpleTarget->detachTexture(); - - // Unmodified base image - ShaderBinder binder(m_simpleShader); - QMatrix4x4 mvp = screenProjection; - mvp.translate(w->x(), w->y()); - m_simpleShader->setUniform(GLShader::ModelViewProjectionMatrix, mvp); - m_simpleShader->setUniform("u_alphaProgress", opacity); - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - blurTexture.bind(); - blurTexture.generateMipmaps(); - blurTexture.render(infiniteRegion(), w->geometry()); - blurTexture.unbind(); - glDisable(GL_BLEND); -} - void BlurEffect::doBlur(const QRegion& shape, const QRect& screen, const float opacity, const QMatrix4x4 &screenProjection, bool isDock) { QRegion expandedBlurRegion = expand(shape) & expand(screen); diff --git a/effects/blur/blur.kcfg b/effects/blur/blur.kcfg --- a/effects/blur/blur.kcfg +++ b/effects/blur/blur.kcfg @@ -8,8 +8,5 @@ 5 - - false - diff --git a/effects/blur/blur_config.ui b/effects/blur/blur_config.ui --- a/effects/blur/blur_config.ui +++ b/effects/blur/blur_config.ui @@ -77,16 +77,6 @@ - - - - Use simple fullscreen blur - - - false - - - diff --git a/effects/logout/data/1.10/logout-blur.frag b/effects/logout/data/1.10/logout-blur.frag deleted file mode 100644 --- a/effects/logout/data/1.10/logout-blur.frag +++ /dev/null @@ -1,9 +0,0 @@ -uniform sampler2D sampler; -uniform float u_alphaProgress; - -varying vec2 texcoord0; - -void main() { - gl_FragColor = texture2D(sampler, texcoord0, 1.75); - gl_FragColor.a = u_alphaProgress; -} diff --git a/effects/logout/data/1.40/logout-blur.frag b/effects/logout/data/1.40/logout-blur.frag deleted file mode 100644 --- a/effects/logout/data/1.40/logout-blur.frag +++ /dev/null @@ -1,14 +0,0 @@ -#version 140 - -uniform sampler2D sampler; -uniform float u_alphaProgress; - -in vec2 texcoord0; -out vec4 fragColor; - -void main() { - vec4 texel = texture(sampler, texcoord0, 1.75); - texel.a = u_alphaProgress; - - fragColor = texel; -} diff --git a/effects/shaders.qrc b/effects/shaders.qrc --- a/effects/shaders.qrc +++ b/effects/shaders.qrc @@ -6,7 +6,6 @@ cube/data/1.10/cylinder.vert cube/data/1.10/sphere.vert invert/data/1.10/invert.frag - logout/data/1.10/logout-blur.frag lookingglass/data/1.10/lookingglass.frag startupfeedback/data/blinking-startup-fragment.glsl @@ -17,7 +16,6 @@ cube/data/1.40/cylinder.vert cube/data/1.40/sphere.vert invert/data/1.40/invert.frag - logout/data/1.40/logout-blur.frag lookingglass/data/1.40/lookingglass.frag