blur-effect: Use sigma value instead of blur radius

Almost all implementations, including CSS [1] of gaussian blurs use the
sigma/standard deviation value as the input parameter, even if they call
that value "radius". Since using sigma is more correct mathematically
and avoids confusion for people used to other blur implementations, use
that parameter here, too.

[1] https://www.w3.org/TR/filter-effects-1/#funcdef-filter-blur

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/991
This commit is contained in:
Jonas Dreßler
2020-02-10 15:34:57 +01:00
committed by Georges Basile Stavracas Neto
parent d26bb38be9
commit f351cfa2f7
3 changed files with 43 additions and 44 deletions

View File

@ -19,7 +19,7 @@ const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver';
const CROSSFADE_TIME = 300;
const BLUR_BRIGHTNESS = 0.55;
const BLUR_RADIUS = 200;
const BLUR_SIGMA = 60;
const SUMMARY_ICON_SIZE = 32;
@ -516,7 +516,7 @@ var UnlockDialog = GObject.registerClass({
widget.add_effect(new Shell.BlurEffect({
brightness: BLUR_BRIGHTNESS,
blur_radius: BLUR_RADIUS,
sigma: BLUR_SIGMA,
}));
}