From 7ad30a564c1eefdc6caf2d988b356b0e91cc0e60 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Sat, 28 Jan 2017 16:43:37 +0300 Subject: [PATCH] Cairo surface format seems to be always Rgba8888 for some reason --- src/Gtk/Avalonia.Gtk3/ImageSurfaceFramebuffer.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/Gtk/Avalonia.Gtk3/ImageSurfaceFramebuffer.cs b/src/Gtk/Avalonia.Gtk3/ImageSurfaceFramebuffer.cs index e955f82764..a2b06d0d5e 100644 --- a/src/Gtk/Avalonia.Gtk3/ImageSurfaceFramebuffer.cs +++ b/src/Gtk/Avalonia.Gtk3/ImageSurfaceFramebuffer.cs @@ -54,16 +54,8 @@ namespace Avalonia.Gtk3 //TODO: Proper DPI detect public Size Dpi => new Size(96, 96); - public PixelFormat Format - { - get - { - if (AvaloniaLocator.Current.GetService().GetRuntimeInfo().OperatingSystem == - OperatingSystemType.WinNT) - return PixelFormat.Bgra8888; - return PixelFormat.Rgba8888; - } - } + + public PixelFormat Format => PixelFormat.Bgra8888; } }