From 8cb551ebc2f0a423ded271fabdaade9be401e231 Mon Sep 17 00:00:00 2001 From: Darth Affe Date: Sun, 23 Apr 2023 18:33:01 +0200 Subject: [PATCH] Added aggresive inline to GetColor in SKTexture --- src/Artemis.Core/RGB.NET/SKTexture.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Artemis.Core/RGB.NET/SKTexture.cs b/src/Artemis.Core/RGB.NET/SKTexture.cs index 3cb3a249c..9664318ae 100644 --- a/src/Artemis.Core/RGB.NET/SKTexture.cs +++ b/src/Artemis.Core/RGB.NET/SKTexture.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Artemis.Core.SkiaSharp; using RGB.NET.Core; @@ -107,10 +108,8 @@ public sealed class SKTexture : PixelTexture, IDisposable } /// - protected override Color GetColor(in ReadOnlySpan pixel) - { - return new Color(pixel[2], pixel[1], pixel[0]); - } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + protected override Color GetColor(in ReadOnlySpan pixel) => new(pixel[2], pixel[1], pixel[0]); /// public override Color this[in Rectangle rectangle] => Color.Transparent;