Fix blur noise effect using incorrect scaling value
ClosedPublic

Authored by anemeth on Apr 25 2018, 3:02 PM.

Details

Summary

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.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
anemeth created this revision.Apr 25 2018, 3:02 PM
Restricted Application added a project: KWin. · View Herald TranscriptApr 25 2018, 3:02 PM
Restricted Application added subscribers: KWin, kwin. · View Herald Transcript
anemeth requested review of this revision.Apr 25 2018, 3:02 PM
davidedmundson accepted this revision.Apr 25 2018, 3:04 PM
davidedmundson added a subscriber: davidedmundson.

Please use a more descriptive commit message than this when merging.

This revision is now accepted and ready to land.Apr 25 2018, 3:04 PM
anemeth updated this revision to Diff 33082.Apr 25 2018, 3:09 PM

Fix accidental inverted logic.

@davidedmundson I usually create the diff in acranist and when it's uploaded I edit it on the phab website.
You were just too fast, I didn't have enought time :)

anemeth edited the summary of this revision. (Show Details)Apr 25 2018, 3:14 PM
anemeth retitled this revision from Fix blur noise effect to Fix blur noise effect using incorrect scaling value.Apr 25 2018, 6:00 PM
This revision was automatically updated to reflect the committed changes.