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>
/// Defines the contract for an action that operates on a row.
/// </summary>
public interface IRowAction
public interface IRowOperation
{
/// <summary>
/// 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.
/// </summary>
/// <typeparam name="TBuffer">The type of buffer elements.</typeparam>
public interface IRowAction<TBuffer>
public interface IRowOperation<TBuffer>
where TBuffer : unmanaged
{
/// <summary>

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

@ -38,14 +38,14 @@ namespace SixLabors.ImageSharp.Advanced
}
}
private readonly struct WrappingRowAction<T>
where T : struct, IRowAction
private readonly struct RowOperationWrapper<T>
where T : struct, IRowOperation
{
private readonly IterationParameters info;
private readonly T action;
[MethodImpl(InliningOptions.ShortMethod)]
public WrappingRowAction(in IterationParameters info, in T action)
public RowOperationWrapper(in IterationParameters info, in T action)
{
this.info = info;
this.action = action;
@ -71,8 +71,8 @@ namespace SixLabors.ImageSharp.Advanced
}
}
private readonly struct WrappingRowAction<T, TBuffer>
where T : struct, IRowAction<TBuffer>
private readonly struct RowOperationWrapper<T, TBuffer>
where T : struct, IRowOperation<TBuffer>
where TBuffer : unmanaged
{
private readonly IterationParameters info;
@ -80,7 +80,7 @@ namespace SixLabors.ImageSharp.Advanced
private readonly T action;
[MethodImpl(InliningOptions.ShortMethod)]
public WrappingRowAction(
public RowOperationWrapper(
in IterationParameters info,
MemoryAllocator allocator,
in T action)
@ -102,7 +102,7 @@ namespace SixLabors.ImageSharp.Advanced
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;

Loading…
Cancel
Save