Browse Source

allow enabling of windows.ui.composition with win32 options.

tmp-winuicomp_with_manual_fbo
Dan Walmsley 6 years ago
parent
commit
1d12750598
  1. 9
      src/Windows/Avalonia.Win32/Win32Platform.cs
  2. 3
      src/Windows/Avalonia.Win32/WindowImpl.cs

9
src/Windows/Avalonia.Win32/Win32Platform.cs

@ -39,6 +39,15 @@ namespace Avalonia
public bool AllowEglInitialization { get; set; } = true;
public bool? EnableMultitouch { get; set; }
public bool OverlayPopups { get; set; }
/// <summary>
/// Render Avalonia to a Texture inside the Windows.UI.Composition tree.
/// </summary>
/// <remarks>
/// Supported on Windows 10 build 16299 and above. Ignored on other versions.
/// This is recommended if you need to use AcrylicBlur or acrylic in your applications.
/// </remarks>
public bool UseWindowsUIComposition { get; set; }
}
}

3
src/Windows/Avalonia.Win32/WindowImpl.cs

@ -101,7 +101,8 @@ namespace Avalonia.Win32
};
_rendererLock = new ManagedDeferredRendererLock();
_isUsingComposition = Win32Platform.WindowsVersion.Major >= 10 && Win32Platform.WindowsVersion.Build >= 16299 &&
_isUsingComposition = Win32Platform.Options.UseWindowsUIComposition &&
Win32Platform.WindowsVersion.Major >= 10 && Win32Platform.WindowsVersion.Build >= 16299 &&
Win32GlManager.EglFeature.Display is AngleWin32EglDisplay angleDisplay &&
angleDisplay.PlatformApi == AngleOptions.PlatformApi.DirectX11;

Loading…
Cancel
Save