Skip to content

Commit

Permalink
Bad performance when backgound blur is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
JosefNemec committed Jul 26, 2019
1 parent b68ee6c commit 5fedd05
Show file tree
Hide file tree
Showing 5 changed files with 141 additions and 127 deletions.
7 changes: 4 additions & 3 deletions source/Playnite.DesktopApp/Controls/Views/Library.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ private void AppSettings_PropertyChanged(object sender, PropertyChangedEventArgs
else if (e.PropertyName == nameof(PlayniteSettings.DarkenWindowBackgroundImage) ||
e.PropertyName == nameof(PlayniteSettings.BlurWindowBackgroundImage) ||
e.PropertyName == nameof(PlayniteSettings.BackgroundImageBlurAmount) ||
e.PropertyName == nameof(PlayniteSettings.BackgroundImageDarkAmount))
e.PropertyName == nameof(PlayniteSettings.BackgroundImageDarkAmount) ||
e.PropertyName == nameof(PlayniteSettings.HighQualityBackgroundBlur))
{
SetBackgroundEffect();
}
Expand Down Expand Up @@ -143,9 +144,9 @@ private void SetBackgroundEffect()
{
ImageBackground.Effect = new BlurEffect()
{
KernelType = KernelType.Gaussian,
KernelType = KernelType.Box,
Radius = mainModel.AppSettings.BackgroundImageBlurAmount,
RenderingBias = RenderingBias.Quality
RenderingBias = mainModel.AppSettings.HighQualityBackgroundBlur ? RenderingBias.Quality : RenderingBias.Performance
};
}
else
Expand Down
Loading

0 comments on commit 5fedd05

Please sign in to comment.