File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
src/Windows/Avalonia.Win32 Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,23 @@ public static void Initialize()
24
24
{
25
25
var egl = EglPlatformOpenGlInterface . TryCreate ( ( ) => new AngleWin32EglDisplay ( ) ) ;
26
26
27
- if ( egl != null && opts . UseWindowsUIComposition )
27
+ if ( egl != null )
28
28
{
29
- WinUICompositorConnection . TryCreateAndRegister ( egl , opts . CompositionBackdropCornerRadius ) ;
29
+ if ( opts . EglRendererBlacklist != null )
30
+ {
31
+ foreach ( var item in opts . EglRendererBlacklist )
32
+ {
33
+ if ( egl . PrimaryEglContext . GlInterface . Renderer . Contains ( item ) )
34
+ {
35
+ return null ;
36
+ }
37
+ }
38
+ }
39
+
40
+ if ( opts . UseWindowsUIComposition )
41
+ {
42
+ WinUICompositorConnection . TryCreateAndRegister ( egl , opts . CompositionBackdropCornerRadius ) ;
43
+ }
30
44
}
31
45
32
46
return egl ;
Original file line number Diff line number Diff line change @@ -56,6 +56,11 @@ public class Win32PlatformOptions
56
56
/// GPU rendering will not be enabled if this is set to false.
57
57
/// </remarks>
58
58
public bool ? AllowEglInitialization { get ; set ; }
59
+
60
+ public IList < string > EglRendererBlacklist { get ; set ; } = new List < string >
61
+ {
62
+ "Microsoft Basic Render"
63
+ } ;
59
64
60
65
/// <summary>
61
66
/// Enables multitouch support. The default value is true.
You can’t perform that action at this time.
0 commit comments