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> /// <returns>The weighted sum</returns>
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public Vector4 Convolve(Span<Vector4> rowSpan) public Vector4 Convolve(Span<Vector4> rowSpan)
{ => this.ConvolveCore(ref rowSpan[this.StartIndex]);
return this.ConvolveCore(ref rowSpan[this.StartIndex]);
}
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
public Vector4 ConvolveCore(ref Vector4 rowStartRef) public Vector4 ConvolveCore(ref Vector4 rowStartRef)
@ -91,9 +89,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms
/// </summary> /// </summary>
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
internal ResizeKernel AlterLeftValue(int left) internal ResizeKernel AlterLeftValue(int left)
{ => new ResizeKernel(left, this.bufferPtr, this.Length);
return new ResizeKernel(left, this.bufferPtr, this.Length);
}
internal void Fill(Span<double> values) 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)] [MethodImpl(InliningOptions.ShortMethod)]
public Span<Vector4> GetColumnSpan(int x, int startY) public Span<Vector4> GetColumnSpan(int x, int startY)
{ => this.transposedFirstPassBuffer.GetRowSpan(x).Slice(startY - this.currentWindow.Min);
return this.transposedFirstPassBuffer.GetRowSpan(x).Slice(startY - this.currentWindow.Min);
}
public void Initialize() public void Initialize()
{ => this.CalculateFirstPassValues(this.currentWindow);
this.CalculateFirstPassValues(this.currentWindow);
}
public void FillDestinationPixels(RowInterval rowInterval, Buffer2D<TPixel> destination) public void FillDestinationPixels(RowInterval rowInterval, Buffer2D<TPixel> destination)
{ {

Loading…
Cancel
Save