|
|
|
@ -14,6 +14,7 @@ using Avalonia.Input.Platform; |
|
|
|
using Avalonia.OpenGL; |
|
|
|
using Avalonia.Platform; |
|
|
|
using Avalonia.Rendering; |
|
|
|
using Avalonia.Rendering.Composition; |
|
|
|
using Avalonia.Threading; |
|
|
|
using Avalonia.Utilities; |
|
|
|
using Avalonia.Win32.Input; |
|
|
|
@ -48,6 +49,8 @@ namespace Avalonia |
|
|
|
/// Immediate re-renders the whole scene when some element is changed on the scene. Deferred re-renders only changed elements.
|
|
|
|
/// </remarks>
|
|
|
|
public bool UseDeferredRendering { get; set; } = true; |
|
|
|
|
|
|
|
public bool UseCompositor { get; set; } |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Enables ANGLE for Windows. For every Windows version that is above Windows 7, the default is true otherwise it's false.
|
|
|
|
@ -132,6 +135,8 @@ namespace Avalonia.Win32 |
|
|
|
public static bool UseDeferredRendering => Options.UseDeferredRendering; |
|
|
|
internal static bool UseOverlayPopups => Options.OverlayPopups; |
|
|
|
public static Win32PlatformOptions Options { get; private set; } |
|
|
|
|
|
|
|
internal static Compositor Compositor { get; private set; } |
|
|
|
|
|
|
|
public Size DoubleClickSize => new Size( |
|
|
|
UnmanagedMethods.GetSystemMetrics(UnmanagedMethods.SystemMetric.SM_CXDOUBLECLK), |
|
|
|
@ -181,6 +186,9 @@ namespace Avalonia.Win32 |
|
|
|
|
|
|
|
if (OleContext.Current != null) |
|
|
|
AvaloniaLocator.CurrentMutable.Bind<IPlatformDragSource>().ToSingleton<DragSource>(); |
|
|
|
|
|
|
|
if (Options.UseCompositor) |
|
|
|
Compositor = Compositor.Create(AvaloniaLocator.Current.GetRequiredService<IRenderLoop>()); |
|
|
|
} |
|
|
|
|
|
|
|
public bool HasMessages() |
|
|
|
|