Browse Source

Minor style cleanup.

js/color-alpha-handling^2
James Jackson-South 5 years ago
parent
commit
89007db1a6
  1. 8
      src/ImageSharp/Processing/Processors/Transforms/Resize/ResizeKernel.cs
  2. 8
      src/ImageSharp/Processing/Processors/Transforms/Resize/ResizeWorker.cs

8
src/ImageSharp/Processing/Processors/Transforms/Resize/ResizeKernel.cs

@ -61,9 +61,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
/// <returns>The weighted sum</returns>
[MethodImpl(InliningOptions.ShortMethod)]
public Vector4 Convolve(Span<Vector4> rowSpan)
{
return this.ConvolveCore(ref rowSpan[this.StartIndex]);
}
=> this.ConvolveCore(ref rowSpan[this.StartIndex]);
[MethodImpl(InliningOptions.ShortMethod)]
public Vector4 ConvolveCore(ref Vector4 rowStartRef)
@ -91,9 +89,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
/// </summary>
[MethodImpl(InliningOptions.ShortMethod)]
internal ResizeKernel AlterLeftValue(int left)
{
return new ResizeKernel(left, this.bufferPtr, this.Length);
}
=> new ResizeKernel(left, this.bufferPtr, this.Length);
internal void Fill(Span<double> values)
{

8
src/ImageSharp/Processing/Processors/Transforms/Resize/ResizeWorker.cs

@ -105,14 +105,10 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
[MethodImpl(InliningOptions.ShortMethod)]
public Span<Vector4> GetColumnSpan(int x, int startY)
{
return this.transposedFirstPassBuffer.GetRowSpan(x).Slice(startY - this.currentWindow.Min);
}
=> this.transposedFirstPassBuffer.GetRowSpan(x).Slice(startY - this.currentWindow.Min);
public void Initialize()
{
this.CalculateFirstPassValues(this.currentWindow);
}
=> this.CalculateFirstPassValues(this.currentWindow);
public void FillDestinationPixels(RowInterval rowInterval, Buffer2D<TPixel> destination)
{

Loading…
Cancel
Save