Browse Source

Merge branch 'master' into nullable/avalonia-input

pull/4284/head
Dariusz Komosiński 6 years ago
committed by GitHub
parent
commit
5aeadaaacc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/Avalonia.OpenGL/AngleOptions.cs
  2. 3
      src/Avalonia.OpenGL/EglConsts.cs
  3. 6
      src/Avalonia.OpenGL/EglDisplay.cs
  4. 6
      src/Skia/Avalonia.Skia/SkiaOptions.cs

5
src/Avalonia.OpenGL/AngleOptions.cs

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

3
src/Avalonia.OpenGL/EglConsts.cs

@ -186,6 +186,9 @@ namespace Avalonia.OpenGL
public const int EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE = 0x3206;
public const int EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE = 0x320A;
public const int EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE = 0x345E;
public const int EGL_PLATFORM_ANGLE_TYPE_OPENGL_ANGLE = 0x320D;
public const int EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE = 0x320E;
//EGL_ANGLE_platform_angle_d3d
public const int EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE = 0x3209;

6
src/Avalonia.OpenGL/EglDisplay.cs

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

6
src/Skia/Avalonia.Skia/SkiaOptions.cs

@ -16,6 +16,10 @@ namespace Avalonia
/// <summary>
/// The maximum number of bytes for video memory to store textures and resources.
/// </summary>
public long? MaxGpuResourceSizeBytes { get; set; }
/// <remarks>
/// This is set by default to the recommended value for Avalonia.
/// Setting this to null will give you the default Skia value.
/// </remarks>
public long? MaxGpuResourceSizeBytes { get; set; } = 1024 * 600 * 4 * 12; // ~28mb 12x 1024 x 600 textures.
}
}

Loading…
Cancel
Save