Skip to content

Commit

Permalink
Minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrubN committed Nov 6, 2024
1 parent d4985d3 commit 47926c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions binding/SkiaSharp/SKCodec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ public SKCodecResult GetPixels (SKImageInfo info, byte[] pixels)
if (pixels == null)
throw new ArgumentNullException (nameof (pixels));

fixed (byte* p = pixels) {
return GetPixels (info, (IntPtr)p, info.RowBytes, SKCodecOptions.Default);
}
return GetPixels (info, pixels.AsSpan ());
}

public SKCodecResult GetPixels (SKImageInfo info, Span<byte> pixels)
Expand Down
2 changes: 1 addition & 1 deletion binding/SkiaSharp/SKPath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public SKPoint[] GetLine ()
public bool TryGetLine (Span<SKPoint> points)
{
if (points.Length != 2)
return false;
throw new ArgumentException ("Points must have a length of 2.");

fixed (SKPoint* p = points) {
var result = SkiaApi.sk_path_is_line (Handle, p);
Expand Down

0 comments on commit 47926c8

Please sign in to comment.