From 0f5643da88824e6baf360307f7e196111386f9cf Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Fri, 26 Oct 2018 15:33:29 +0100 Subject: [PATCH 1/3] gpu rendering is the defaults on gtk and avalonia native both these platforms will fallback to SW render if GPU not available. --- src/Avalonia.Native/AvaloniaNativePlatform.cs | 2 +- src/Gtk/Avalonia.Gtk3/Gtk3Platform.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Avalonia.Native/AvaloniaNativePlatform.cs b/src/Avalonia.Native/AvaloniaNativePlatform.cs index 0b5d71039d..091a4ad285 100644 --- a/src/Avalonia.Native/AvaloniaNativePlatform.cs +++ b/src/Avalonia.Native/AvaloniaNativePlatform.cs @@ -120,7 +120,7 @@ namespace Avalonia.Native { public AvaloniaNativeMacOptions MacOptions { get; set; } public bool UseDeferredRendering { get; set; } = true; - public bool UseGpu { get; set; } = false; + public bool UseGpu { get; set; } = true; internal AvaloniaNativeOptions(IAvaloniaNativeFactory factory) { var mac = factory.GetMacOptions(); diff --git a/src/Gtk/Avalonia.Gtk3/Gtk3Platform.cs b/src/Gtk/Avalonia.Gtk3/Gtk3Platform.cs index 8444e509fd..7bb8facaf5 100644 --- a/src/Gtk/Avalonia.Gtk3/Gtk3Platform.cs +++ b/src/Gtk/Avalonia.Gtk3/Gtk3Platform.cs @@ -148,8 +148,8 @@ namespace Avalonia.Gtk3 public class Gtk3PlatformOptions { - public bool? UseDeferredRendering { get; set; } - public bool? UseGpuAcceleration { get; set; } + public bool? UseDeferredRendering { get; set; } = true; + public bool? UseGpuAcceleration { get; set; } = true; public ICustomGtk3NativeLibraryResolver CustomResolver { get; set; } } } From 7add17a39b4e72da26c5126527ee52c48e94b3c6 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Fri, 26 Oct 2018 17:02:26 +0100 Subject: [PATCH 2/3] dont enable gpu by default on gtk --- src/Gtk/Avalonia.Gtk3/Gtk3Platform.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Gtk/Avalonia.Gtk3/Gtk3Platform.cs b/src/Gtk/Avalonia.Gtk3/Gtk3Platform.cs index 7bb8facaf5..13b610c062 100644 --- a/src/Gtk/Avalonia.Gtk3/Gtk3Platform.cs +++ b/src/Gtk/Avalonia.Gtk3/Gtk3Platform.cs @@ -149,7 +149,7 @@ namespace Avalonia.Gtk3 public class Gtk3PlatformOptions { public bool? UseDeferredRendering { get; set; } = true; - public bool? UseGpuAcceleration { get; set; } = true; + public bool? UseGpuAcceleration { get; set; }; public ICustomGtk3NativeLibraryResolver CustomResolver { get; set; } } } From 821606455d34fc354b8dffa49fbfd91fef194255 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 26 Oct 2018 19:50:09 +0100 Subject: [PATCH 3/3] fix gtk3 default settings --- src/Gtk/Avalonia.Gtk3/Gtk3Platform.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Gtk/Avalonia.Gtk3/Gtk3Platform.cs b/src/Gtk/Avalonia.Gtk3/Gtk3Platform.cs index 13b610c062..8444e509fd 100644 --- a/src/Gtk/Avalonia.Gtk3/Gtk3Platform.cs +++ b/src/Gtk/Avalonia.Gtk3/Gtk3Platform.cs @@ -148,8 +148,8 @@ namespace Avalonia.Gtk3 public class Gtk3PlatformOptions { - public bool? UseDeferredRendering { get; set; } = true; - public bool? UseGpuAcceleration { get; set; }; + public bool? UseDeferredRendering { get; set; } + public bool? UseGpuAcceleration { get; set; } public ICustomGtk3NativeLibraryResolver CustomResolver { get; set; } } }