diff --git a/src/Windows/Avalonia.Win32/Win32GlManager.cs b/src/Windows/Avalonia.Win32/Win32GlManager.cs index 0376a41f8c..2a3f4a3384 100644 --- a/src/Windows/Avalonia.Win32/Win32GlManager.cs +++ b/src/Windows/Avalonia.Win32/Win32GlManager.cs @@ -24,9 +24,23 @@ namespace Avalonia.Win32 { var egl = EglPlatformOpenGlInterface.TryCreate(() => new AngleWin32EglDisplay()); - if (egl != null && opts.UseWindowsUIComposition) + if (egl != null) { - WinUICompositorConnection.TryCreateAndRegister(egl, opts.CompositionBackdropCornerRadius); + if (opts.EglRendererBlacklist != null) + { + foreach (var item in opts.EglRendererBlacklist) + { + if (egl.PrimaryEglContext.GlInterface.Renderer.Contains(item)) + { + return null; + } + } + } + + if (opts.UseWindowsUIComposition) + { + WinUICompositorConnection.TryCreateAndRegister(egl, opts.CompositionBackdropCornerRadius); + } } return egl; diff --git a/src/Windows/Avalonia.Win32/Win32Platform.cs b/src/Windows/Avalonia.Win32/Win32Platform.cs index 2947493c41..2ed7282834 100644 --- a/src/Windows/Avalonia.Win32/Win32Platform.cs +++ b/src/Windows/Avalonia.Win32/Win32Platform.cs @@ -56,6 +56,11 @@ namespace Avalonia /// GPU rendering will not be enabled if this is set to false. /// public bool? AllowEglInitialization { get; set; } + + public IList EglRendererBlacklist { get; set; } = new List + { + "Microsoft Basic Renderer" + }; /// /// Enables multitouch support. The default value is true.