Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit b3b691a2 authored by Alex Nemeth's avatar Alex Nemeth

Fix blur on Wayland when scaling is used

Summary:
Blur should now work on Wayland when scaling is used.
This does not affect X11 as `GLRenderTarget::virtualScreenScale()` is always 1 on X11

BUG: 391387
Depends on D12678

Test Plan:
  - log in in a Wayland session
  - turn display scaling to 2x
  - open a transparent window (for example: Konsole with transparent and blur enabled profile)
  - blurs the content under the window corretly

Reviewers: davidedmundson, #kwin

Reviewed By: davidedmundson, #kwin

Subscribers: romangg, apol, zzag, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D12700
parent 42dc3e4c
......@@ -681,15 +681,15 @@ void BlurEffect::upscaleRenderToScreen(GLVertexBuffer *vbo, int vboStart, int bl
if (m_noiseStrength > 0) {
m_shader->bind(BlurShader::NoiseSampleType);
m_shader->setTargetTextureSize(m_renderTextures[0].size());
m_shader->setNoiseTextureSize(m_noiseTexture.size());
m_shader->setTexturePosition(windowPosition);
m_shader->setTargetTextureSize(m_renderTextures[0].size() * GLRenderTarget::virtualScreenScale());
m_shader->setNoiseTextureSize(m_noiseTexture.size() * GLRenderTarget::virtualScreenScale());
m_shader->setTexturePosition(windowPosition * GLRenderTarget::virtualScreenScale());
glActiveTexture(GL_TEXTURE1);
m_noiseTexture.bind();
} else {
m_shader->bind(BlurShader::UpSampleType);
m_shader->setTargetTextureSize(m_renderTextures[0].size());
m_shader->setTargetTextureSize(m_renderTextures[0].size() * GLRenderTarget::virtualScreenScale());
}
m_shader->setOffset(m_offset);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment