Bug 415844 - Constrast and Blur effects not using desktop theme mesh
Summary: Constrast and Blur effects not using desktop theme mesh
Status: RESOLVED NOT A BUG
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (show other bugs)
Version: 5.17.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-03 16:21 UTC by veggero
Modified: 2020-01-18 19:57 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description veggero 2020-01-03 16:21:29 UTC
SUMMARY

Currently, the Constrast and Blur effects are not following the mesh in the desktop theme, but are drawn as rectangles. This means that even though a desktop theme has rounded corners, if the contrast effect is active, it will appear as if it had sharp corners, because the contrast effect is drawn as a rectangle. Currently, the rounded corners in Breeze are faked by the shadow that is drawn on top of the effect.

STEPS TO REPRODUCE
1. Open the [traslucent/]dialog/background.svg file on a desktop theme with rounded mesh object
2. Make everything 100% transparent, except the mesh file
3. Switch to that theme

OBSERVED RESULT

You can see blur and contrast effect (as everything else was removed), but they are squared

EXPECTED RESULT

Blur and contrast effect will remain, but they will have rounded corners


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.17.4
KDE Plasma Version: 5.17.4
KDE Frameworks Version: 5.66.0
Qt Version: 5.13.2

ADDITIONAL INFORMATION

Only the blur and contrast effects on: https://phabricator.kde.org/file/data/fbfelsfbxqsdzrjob6e2/PHID-FILE-4xtz5oo7zfh4q7trwucb/Screenshot_20191128_153515.png

Only the blur effect on: https://phabricator.kde.org/file/data/k6fxj47an3znuawuq3se/PHID-FILE-lfpbvmhiox2q32kaerv2/Screenshot_20191215_170023.png

This is blocking https://phabricator.kde.org/D25015 as making the shadows lighter will show sharp corners instead of typical breeze rounded ones.
Comment 1 David Edmundson 2020-01-04 12:02:41 UTC
Are you sure the returned alpha mask in FrameSvgPrivate::alphaMask is correct?
If not please verify that before we look at anything on the kwin side.

Easiest debug step is to just add
d->alphaMask().save("/tmp/frameMaskTest.png");
in FrameSvg::mask()


It appears to read from a bunch of SVG elements with a "mask-" prefix, and you've not mentioned that on your steps.
Comment 2 veggero 2020-01-18 19:57:11 UTC
Masks are used. This was not the problem.