Browse Source

Merge branch 'master' into avoidMultipleArrayLookup

af/merge-core
Anton Firsov 7 years ago
committed by GitHub
parent
commit
3bcea7bc8f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/ImageSharp/ImageFrame{TPixel}.cs
  2. 1
      tests/ImageSharp.Benchmarks/Color/RgbToYCbCr.cs

7
src/ImageSharp/ImageFrame{TPixel}.cs

@ -4,7 +4,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.Metadata;
@ -91,7 +91,7 @@ namespace SixLabors.ImageSharp
Guard.MustBeGreaterThan(height, 0, nameof(height));
this.PixelBuffer = this.MemoryAllocator.Allocate2D<TPixel>(width, height);
this.Clear(configuration.GetParallelOptions(), backgroundColor);
this.Clear(backgroundColor);
}
/// <summary>
@ -283,9 +283,8 @@ namespace SixLabors.ImageSharp
/// <summary>
/// Clears the bitmap.
/// </summary>
/// <param name="parallelOptions">The parallel options.</param>
/// <param name="value">The value to initialize the bitmap with.</param>
internal void Clear(ParallelOptions parallelOptions, TPixel value)
internal void Clear(TPixel value)
{
Span<TPixel> span = this.GetPixelSpan();

1
tests/ImageSharp.Benchmarks/Color/RgbToYCbCr.cs

@ -85,7 +85,6 @@ namespace SixLabors.ImageSharp.Benchmarks
}
}
// Waiting for C# 7 stackalloc keyword patiently ...
private static class OnStackInputCache
{
public unsafe struct Byte

Loading…
Cancel
Save