Browse Source

dont allocate lists for angleoptions.

pull/4619/head
Dan Walmsley 6 years ago
parent
commit
531b64e466
  1. 2
      src/Avalonia.OpenGL/AngleOptions.cs
  2. 2
      src/Avalonia.OpenGL/EglDisplay.cs

2
src/Avalonia.OpenGL/AngleOptions.cs

@ -10,6 +10,6 @@ namespace Avalonia.OpenGL
DirectX11 DirectX11
} }
public List<PlatformApi> AllowedPlatformApis { get; set; } = null; public IList<PlatformApi> AllowedPlatformApis { get; set; } = null;
} }
} }

2
src/Avalonia.OpenGL/EglDisplay.cs

@ -36,7 +36,7 @@ namespace Avalonia.OpenGL
throw new OpenGlException("eglGetPlatformDisplayEXT is not supported by libegl.dll"); throw new OpenGlException("eglGetPlatformDisplayEXT is not supported by libegl.dll");
var allowedApis = AvaloniaLocator.Current.GetService<AngleOptions>()?.AllowedPlatformApis var allowedApis = AvaloniaLocator.Current.GetService<AngleOptions>()?.AllowedPlatformApis
?? new List<AngleOptions.PlatformApi> {AngleOptions.PlatformApi.DirectX11}; ?? new [] {AngleOptions.PlatformApi.DirectX11};
foreach (var platformApi in allowedApis) foreach (var platformApi in allowedApis)
{ {

Loading…
Cancel
Save