Switch to Span<T>
or ReadOnlySpan<T>
#2616
Labels
area/SkiaSharp
Issues that relate to the C# binding of SkiaSharp.
status/up-for-grabs
tenet/performance
Performance related issues
type/enhancement
Description
Part of #2615
The SkiaSharp codebase is quite old and existed before the introduction of spans. (See more https://learn.microsoft.com/en-us/dotnet/standard/memory-and-spans/memory-t-usage-guidelines)
Current files in the core binding using arrays:
public byte[] ToArray ()
is intentially an array, there is:public ReadOnlySpan<byte> AsSpan ()
public Span<byte> Span { get; }
public SKPoint[] Radii { get; }
still exists as it is a convenience and this is accessible using non-arrays by querying each corner individually (which is what this property does)The text was updated successfully, but these errors were encountered: