Browse Source

Fall back to direct SKBitmap

pull/1195/head
Nikita Tsukanov 8 years ago
parent
commit
004f8a4cdd
  1. 2
      src/Skia/Avalonia.Skia/BitmapImpl.cs

2
src/Skia/Avalonia.Skia/BitmapImpl.cs

@ -33,7 +33,7 @@ namespace Avalonia.Skia
PixelWidth = width;
_dpi = dpi;
var colorType = fmt?.ToSkColorType() ?? SKImageInfo.PlatformColorType;
var runtimePlatform = AvaloniaLocator.Current?.GetService<IRuntimePlatform>()
var runtimePlatform = AvaloniaLocator.Current?.GetService<IRuntimePlatform>();
var runtime = runtimePlatform?.GetRuntimeInfo();
if (runtime?.IsDesktop == true && runtime?.OperatingSystem == OperatingSystemType.Linux)
colorType = SKColorType.Bgra8888;

Loading…
Cancel
Save