mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Added aggresive inline to GetColor in SKTexture
This commit is contained in:
1 parent
1b23607d92
commit
8cb551ebc2
1 file changed
+3
-4
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using Artemis.Core.SkiaSharp;
|
using Artemis.Core.SkiaSharp;
|
||||||
using RGB.NET.Core;
|
using RGB.NET.Core;
|
||||||
@@ -107,10 +108,8 @@ public sealed class SKTexture : PixelTexture<byte>, IDisposable
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override Color GetColor(in ReadOnlySpan<byte> pixel)
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
{
|
protected override Color GetColor(in ReadOnlySpan<byte> pixel) => new(pixel[2], pixel[1], pixel[0]);
|
||||||
return new Color(pixel[2], pixel[1], pixel[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override Color this[in Rectangle rectangle] => Color.Transparent;
|
public override Color this[in Rectangle rectangle] => Color.Transparent;
|
||||||
|
|||||||
Reference in new issue
Block a user