Browse Source

Renamed new APIs

pull/1132/head
Sergio Pedri 6 years ago
parent
commit
7fd93e8b70
  1. 2
      src/ImageSharp/Advanced/IRowOperation.cs
  2. 2
      src/ImageSharp/Advanced/IRowOperation{TBuffer}.cs
  3. 14
      src/ImageSharp/Advanced/ParallelRowIterator.Wrappers.cs

2
src/ImageSharp/Advanced/IRowAction.cs → src/ImageSharp/Advanced/IRowOperation.cs

@ -6,7 +6,7 @@ namespace SixLabors.ImageSharp.Advanced
/// <summary> /// <summary>
/// Defines the contract for an action that operates on a row. /// Defines the contract for an action that operates on a row.
/// </summary> /// </summary>
public interface IRowAction public interface IRowOperation
{ {
/// <summary> /// <summary>
/// Invokes the method passing the row y coordinate. /// Invokes the method passing the row y coordinate.

2
src/ImageSharp/Advanced/IRowAction{TBuffer}.cs → src/ImageSharp/Advanced/IRowOperation{TBuffer}.cs

@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.Advanced
/// Defines the contract for an action that operates on a row with a temporary buffer. /// Defines the contract for an action that operates on a row with a temporary buffer.
/// </summary> /// </summary>
/// <typeparam name="TBuffer">The type of buffer elements.</typeparam> /// <typeparam name="TBuffer">The type of buffer elements.</typeparam>
public interface IRowAction<TBuffer> public interface IRowOperation<TBuffer>
where TBuffer : unmanaged where TBuffer : unmanaged
{ {
/// <summary> /// <summary>

14
src/ImageSharp/Advanced/ParallelRowIterator.Wrappers.cs

@ -38,14 +38,14 @@ namespace SixLabors.ImageSharp.Advanced
} }
} }
private readonly struct WrappingRowAction<T> private readonly struct RowOperationWrapper<T>
where T : struct, IRowAction where T : struct, IRowOperation
{ {
private readonly IterationParameters info; private readonly IterationParameters info;
private readonly T action; private readonly T action;
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public WrappingRowAction(in IterationParameters info, in T action) public RowOperationWrapper(in IterationParameters info, in T action)
{ {
this.info = info; this.info = info;
this.action = action; this.action = action;
@ -71,8 +71,8 @@ namespace SixLabors.ImageSharp.Advanced
} }
} }
private readonly struct WrappingRowAction<T, TBuffer> private readonly struct RowOperationWrapper<T, TBuffer>
where T : struct, IRowAction<TBuffer> where T : struct, IRowOperation<TBuffer>
where TBuffer : unmanaged where TBuffer : unmanaged
{ {
private readonly IterationParameters info; private readonly IterationParameters info;
@ -80,7 +80,7 @@ namespace SixLabors.ImageSharp.Advanced
private readonly T action; private readonly T action;
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public WrappingRowAction( public RowOperationWrapper(
in IterationParameters info, in IterationParameters info,
MemoryAllocator allocator, MemoryAllocator allocator,
in T action) in T action)
@ -102,7 +102,7 @@ namespace SixLabors.ImageSharp.Advanced
int yMax = Math.Min(yMin + this.info.StepY, this.info.MaxY); int yMax = Math.Min(yMin + this.info.StepY, this.info.MaxY);
using IMemoryOwner<TBuffer> buffer = this.allocator.Allocate<TBuffer>(this.info.MaxX); using IMemoryOwner<TBuffer> buffer = this.allocator.Allocate<TBuffer>(this.info.Width);
Span<TBuffer> span = buffer.Memory.Span; Span<TBuffer> span = buffer.Memory.Span;

Loading…
Cancel
Save