Commit 16a0e241 authored by Alex Nemeth's avatar Alex Nemeth Committed by Alex Nemeth
Browse files

Fix blur noise effect using incorrect scaling value

`QGuiApplication::primaryScreen()->logicalDotsPerInch()` sometimes reports incorrect scale value, for example 95.951 (or even lower) instead of 96.0 at 1x scale and this caused to simply darken blurred areas instead of noising them.
This patch sets a minimum 1x scale for the noise texture, because realistically we will never be below that.

Reviewers: davidedmundson

Reviewed By: davidedmundson

Subscribers: davidedmundson, kwin, #kwin

Tags: #kwin

Differential Revision:
parent 41819da4
......@@ -236,7 +236,7 @@ void BlurEffect::reconfigure(ReconfigureFlags flags)
m_expandSize = blurOffsets[m_downSampleIterations - 1].expandSize;
m_noiseStrength = BlurConfig::noiseStrength();
m_scalingFactor = QGuiApplication::primaryScreen()->logicalDotsPerInch() / 96.0;
m_scalingFactor = qMax(1.0, QGuiApplication::primaryScreen()->logicalDotsPerInch() / 96.0);
Supports Markdown
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