diff --git a/tests/ImageSharp.Benchmarks/Color/Bulk/ToVector4.cs b/tests/ImageSharp.Benchmarks/Color/Bulk/ToVector4.cs index 375518950..3b988757d 100644 --- a/tests/ImageSharp.Benchmarks/Color/Bulk/ToVector4.cs +++ b/tests/ImageSharp.Benchmarks/Color/Bulk/ToVector4.cs @@ -36,8 +36,8 @@ namespace SixLabors.ImageSharp.Benchmarks.ColorSpaces.Bulk [Benchmark(Baseline = true)] public void PerElement() { - Span s = this.source.Span; - Span d = this.destination.Span; + Span s = this.source.GetSpan(); + Span d = this.destination.GetSpan(); for (int i = 0; i < this.Count; i++) { @@ -49,13 +49,13 @@ namespace SixLabors.ImageSharp.Benchmarks.ColorSpaces.Bulk [Benchmark] public void CommonBulk() { - new PixelOperations().ToVector4(this.source.Span, this.destination.Span, this.Count); + new PixelOperations().ToVector4(this.source.GetSpan(), this.destination.GetSpan(), this.Count); } [Benchmark] public void OptimizedBulk() { - PixelOperations.Instance.ToVector4(this.source.Span, this.destination.Span, this.Count); + PixelOperations.Instance.ToVector4(this.source.GetSpan(), this.destination.GetSpan(), this.Count); } } diff --git a/tests/ImageSharp.Benchmarks/Color/Bulk/ToXyz.cs b/tests/ImageSharp.Benchmarks/Color/Bulk/ToXyz.cs index 6c5f762b3..16743eb73 100644 --- a/tests/ImageSharp.Benchmarks/Color/Bulk/ToXyz.cs +++ b/tests/ImageSharp.Benchmarks/Color/Bulk/ToXyz.cs @@ -36,8 +36,8 @@ namespace SixLabors.ImageSharp.Benchmarks.ColorSpaces.Bulk [Benchmark(Baseline = true)] public void PerElement() { - Span s = this.source.Span; - Span d = this.destination.Span; + Span s = this.source.GetSpan(); + Span d = this.destination.GetSpan(); var rgb = default(Rgb24); @@ -55,13 +55,13 @@ namespace SixLabors.ImageSharp.Benchmarks.ColorSpaces.Bulk [Benchmark] public void CommonBulk() { - new PixelOperations().ToRgb24Bytes(this.source.Span, this.destination.Span, this.Count); + new PixelOperations().ToRgb24Bytes(this.source.GetSpan(), this.destination.GetSpan(), this.Count); } [Benchmark] public void OptimizedBulk() { - PixelOperations.Instance.ToRgb24Bytes(this.source.Span, this.destination.Span, this.Count); + PixelOperations.Instance.ToRgb24Bytes(this.source.GetSpan(), this.destination.GetSpan(), this.Count); } } diff --git a/tests/ImageSharp.Benchmarks/Color/Bulk/ToXyzw.cs b/tests/ImageSharp.Benchmarks/Color/Bulk/ToXyzw.cs index f073072b8..f947b6e8d 100644 --- a/tests/ImageSharp.Benchmarks/Color/Bulk/ToXyzw.cs +++ b/tests/ImageSharp.Benchmarks/Color/Bulk/ToXyzw.cs @@ -38,8 +38,8 @@ namespace SixLabors.ImageSharp.Benchmarks.ColorSpaces.Bulk [Benchmark(Baseline = true)] public void PerElement() { - Span s = this.source.Span; - Span d = this.destination.Span; + Span s = this.source.GetSpan(); + Span d = this.destination.GetSpan(); var rgba = default(Rgba32); @@ -58,13 +58,13 @@ namespace SixLabors.ImageSharp.Benchmarks.ColorSpaces.Bulk [Benchmark] public void CommonBulk() { - new PixelOperations().ToRgba32Bytes(this.source.Span, this.destination.Span, this.Count); + new PixelOperations().ToRgba32Bytes(this.source.GetSpan(), this.destination.GetSpan(), this.Count); } [Benchmark] public void OptimizedBulk() { - PixelOperations.Instance.ToRgba32Bytes(this.source.Span, this.destination.Span, this.Count); + PixelOperations.Instance.ToRgba32Bytes(this.source.GetSpan(), this.destination.GetSpan(), this.Count); } } diff --git a/tests/ImageSharp.Benchmarks/PixelBlenders/PorterDuffBulkVsPixel.cs b/tests/ImageSharp.Benchmarks/PixelBlenders/PorterDuffBulkVsPixel.cs index cf26789b5..fe0678aca 100644 --- a/tests/ImageSharp.Benchmarks/PixelBlenders/PorterDuffBulkVsPixel.cs +++ b/tests/ImageSharp.Benchmarks/PixelBlenders/PorterDuffBulkVsPixel.cs @@ -61,14 +61,14 @@ namespace SixLabors.ImageSharp.Benchmarks { using (IBuffer amounts = Configuration.Default.MemoryAllocator.Allocate(image.Width)) { - amounts.Span.Fill(1); + amounts.GetSpan().Fill(1); using (PixelAccessor pixels = image.Lock()) { for (int y = 0; y < image.Height; y++) { Span span = pixels.GetRowSpan(y); - this.BulkVectorConvert(span, span, span, amounts.Span); + this.BulkVectorConvert(span, span, span, amounts.GetSpan()); } } return new CoreSize(image.Width, image.Height); @@ -83,13 +83,13 @@ namespace SixLabors.ImageSharp.Benchmarks { using (IBuffer amounts = Configuration.Default.MemoryAllocator.Allocate(image.Width)) { - amounts.Span.Fill(1); + amounts.GetSpan().Fill(1); using (PixelAccessor pixels = image.Lock()) { for (int y = 0; y < image.Height; y++) { Span span = pixels.GetRowSpan(y); - this.BulkPixelConvert(span, span, span, amounts.Span); + this.BulkPixelConvert(span, span, span, amounts.GetSpan()); } } diff --git a/tests/ImageSharp.Benchmarks/Samplers/Glow.cs b/tests/ImageSharp.Benchmarks/Samplers/Glow.cs index c4c17f0f1..b2fa47893 100644 --- a/tests/ImageSharp.Benchmarks/Samplers/Glow.cs +++ b/tests/ImageSharp.Benchmarks/Samplers/Glow.cs @@ -105,7 +105,7 @@ namespace SixLabors.ImageSharp.Benchmarks using (IBuffer rowColors = Configuration.Default.MemoryAllocator.Allocate(width)) using (PixelAccessor sourcePixels = source.Lock()) { - rowColors.Span.Fill(glowColor); + rowColors.GetSpan().Fill(glowColor); Parallel.For( minY,