From 82b07abc626afa4e3b15c583c94fa298ee5b71ff Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 27 Feb 2020 01:53:32 +0100 Subject: [PATCH] Renamed ParallelRowIterator.IterateRows to IterateRowIntervals --- src/ImageSharp/Advanced/ParallelRowIterator.cs | 12 ++++++------ src/ImageSharp/ImageFrame{TPixel}.cs | 2 +- .../BinaryThresholdProcessor{TPixel}.cs | 2 +- .../Convolution/BokehBlurProcessor{TPixel}.cs | 8 ++++---- .../Convolution2DProcessor{TPixel}.cs | 2 +- .../Convolution2PassProcessor{TPixel}.cs | 4 ++-- .../ConvolutionProcessor{TPixel}.cs | 2 +- .../EdgeDetectorCompassProcessor{TPixel}.cs | 2 +- .../Processors/Dithering/OrderedDither.cs | 4 ++-- .../DrawImageProcessor{TPixelBg,TPixelFg}.cs | 2 +- .../Effects/OilPaintingProcessor{TPixel}.cs | 2 +- ...elRowDelegateProcessor{TPixel,TDelegate}.cs | 2 +- .../Filters/FilterProcessor{TPixel}.cs | 2 +- ...veHistogramEqualizationProcessor{TPixel}.cs | 4 ++-- ...alHistogramEqualizationProcessor{TPixel}.cs | 4 ++-- .../BackgroundColorProcessor{TPixel}.cs | 2 +- .../Overlays/GlowProcessor{TPixel}.cs | 2 +- .../Overlays/VignetteProcessor{TPixel}.cs | 2 +- .../Quantization/FrameQuantizerExtensions.cs | 2 +- .../Quantization/QuantizeProcessor{TPixel}.cs | 2 +- .../Transforms/CropProcessor{TPixel}.cs | 2 +- .../Linear/AffineTransformProcessor{TPixel}.cs | 4 ++-- .../Transforms/Linear/FlipProcessor{TPixel}.cs | 2 +- .../ProjectiveTransformProcessor{TPixel}.cs | 4 ++-- .../Linear/RotateProcessor{TPixel}.cs | 6 +++--- .../Resize/ResizeProcessor{TPixel}.cs | 2 +- .../Helpers/ParallelRowIteratorTests.cs | 18 +++++++++--------- .../TestUtilities/TestImageExtensions.cs | 2 +- 28 files changed, 52 insertions(+), 52 deletions(-) diff --git a/src/ImageSharp/Advanced/ParallelRowIterator.cs b/src/ImageSharp/Advanced/ParallelRowIterator.cs index 123784c57..70b48aee9 100644 --- a/src/ImageSharp/Advanced/ParallelRowIterator.cs +++ b/src/ImageSharp/Advanced/ParallelRowIterator.cs @@ -25,11 +25,11 @@ namespace SixLabors.ImageSharp.Advanced /// The . /// The operation defining the iteration logic on a single . [MethodImpl(InliningOptions.ShortMethod)] - public static void IterateRows(Configuration configuration, Rectangle rectangle, in T operation) + public static void IterateRowIntervals(Configuration configuration, Rectangle rectangle, in T operation) where T : struct, IRowIntervalOperation { var parallelSettings = ParallelExecutionSettings.FromConfiguration(configuration); - IterateRows(rectangle, in parallelSettings, in operation); + IterateRowIntervals(rectangle, in parallelSettings, in operation); } /// @@ -39,7 +39,7 @@ namespace SixLabors.ImageSharp.Advanced /// The . /// The . /// The operation defining the iteration logic on a single . - public static void IterateRows( + public static void IterateRowIntervals( Rectangle rectangle, in ParallelExecutionSettings parallelSettings, in T operation) @@ -84,12 +84,12 @@ namespace SixLabors.ImageSharp.Advanced /// The to get the parallel settings from. /// The . /// The operation defining the iteration logic on a single . - public static void IterateRows(Configuration configuration, Rectangle rectangle, in T operation) + public static void IterateRowIntervals(Configuration configuration, Rectangle rectangle, in T operation) where T : struct, IRowIntervalOperation where TBuffer : unmanaged { var parallelSettings = ParallelExecutionSettings.FromConfiguration(configuration); - IterateRows(rectangle, in parallelSettings, in operation); + IterateRowIntervals(rectangle, in parallelSettings, in operation); } /// @@ -101,7 +101,7 @@ namespace SixLabors.ImageSharp.Advanced /// The . /// The . /// The operation defining the iteration logic on a single . - public static void IterateRows( + public static void IterateRowIntervals( Rectangle rectangle, in ParallelExecutionSettings parallelSettings, in T operation) diff --git a/src/ImageSharp/ImageFrame{TPixel}.cs b/src/ImageSharp/ImageFrame{TPixel}.cs index 85488c12d..f5f1e4079 100644 --- a/src/ImageSharp/ImageFrame{TPixel}.cs +++ b/src/ImageSharp/ImageFrame{TPixel}.cs @@ -277,7 +277,7 @@ namespace SixLabors.ImageSharp var target = new ImageFrame(configuration, this.Width, this.Height, this.Metadata.DeepClone()); var operation = new RowIntervalOperation(this, target, configuration); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, this.Bounds(), in operation); diff --git a/src/ImageSharp/Processing/Processors/Binarization/BinaryThresholdProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Binarization/BinaryThresholdProcessor{TPixel}.cs index ed14a44e9..c3189427f 100644 --- a/src/ImageSharp/Processing/Processors/Binarization/BinaryThresholdProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Binarization/BinaryThresholdProcessor{TPixel}.cs @@ -45,7 +45,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Binarization bool isAlphaOnly = typeof(TPixel) == typeof(A8); var operation = new RowIntervalOperation(interest, source, upper, lower, threshold, isAlphaOnly); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, interest, in operation); diff --git a/src/ImageSharp/Processing/Processors/Convolution/BokehBlurProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Convolution/BokehBlurProcessor{TPixel}.cs index 36d36223a..9a910ae29 100644 --- a/src/ImageSharp/Processing/Processors/Convolution/BokehBlurProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Convolution/BokehBlurProcessor{TPixel}.cs @@ -73,7 +73,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution { // Preliminary gamma highlight pass var gammaOperation = new ApplyGammaExposureRowIntervalOperation(this.SourceRectangle, source.PixelBuffer, this.Configuration, this.gamma); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( this.Configuration, this.SourceRectangle, in gammaOperation); @@ -88,7 +88,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution // Apply the inverse gamma exposure pass, and write the final pixel data var operation = new ApplyInverseGammaExposureRowIntervalOperation(this.SourceRectangle, source.PixelBuffer, processingBuffer, this.Configuration, inverseGamma); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( this.Configuration, this.SourceRectangle, in operation); @@ -121,14 +121,14 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution // Compute the vertical 1D convolution var verticalOperation = new ApplyVerticalConvolutionRowIntervalOperation(sourceRectangle, firstPassBuffer, source.PixelBuffer, kernel); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, sourceRectangle, in verticalOperation); // Compute the horizontal 1D convolutions and accumulate the partial results on the target buffer var horizontalOperation = new ApplyHorizontalConvolutionRowIntervalOperation(sourceRectangle, processingBuffer, firstPassBuffer, kernel, parameters.Z, parameters.W); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, sourceRectangle, in horizontalOperation); diff --git a/src/ImageSharp/Processing/Processors/Convolution/Convolution2DProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Convolution/Convolution2DProcessor{TPixel}.cs index 1c4987c79..219c81617 100644 --- a/src/ImageSharp/Processing/Processors/Convolution/Convolution2DProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Convolution/Convolution2DProcessor{TPixel}.cs @@ -67,7 +67,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution var interest = Rectangle.Intersect(this.SourceRectangle, source.Bounds()); var operation = new RowIntervalOperation(interest, targetPixels, source.PixelBuffer, this.KernelY, this.KernelX, this.Configuration, this.PreserveAlpha); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( this.Configuration, interest, in operation); diff --git a/src/ImageSharp/Processing/Processors/Convolution/Convolution2PassProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Convolution/Convolution2PassProcessor{TPixel}.cs index 33a8ab7d1..833c03308 100644 --- a/src/ImageSharp/Processing/Processors/Convolution/Convolution2PassProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Convolution/Convolution2PassProcessor{TPixel}.cs @@ -65,14 +65,14 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution // Horizontal convolution var horizontalOperation = new RowIntervalOperation(interest, firstPassPixels, source.PixelBuffer, this.KernelX, this.Configuration, this.PreserveAlpha); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( this.Configuration, interest, in horizontalOperation); // Vertical convolution var verticalOperation = new RowIntervalOperation(interest, source.PixelBuffer, firstPassPixels, this.KernelY, this.Configuration, this.PreserveAlpha); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( this.Configuration, interest, in verticalOperation); diff --git a/src/ImageSharp/Processing/Processors/Convolution/ConvolutionProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Convolution/ConvolutionProcessor{TPixel}.cs index 542ee389b..fae222714 100644 --- a/src/ImageSharp/Processing/Processors/Convolution/ConvolutionProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Convolution/ConvolutionProcessor{TPixel}.cs @@ -57,7 +57,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution var interest = Rectangle.Intersect(this.SourceRectangle, source.Bounds()); var operation = new RowIntervalOperation(interest, targetPixels, source.PixelBuffer, this.KernelXY, this.Configuration, this.PreserveAlpha); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( this.Configuration, interest, in operation); diff --git a/src/ImageSharp/Processing/Processors/Convolution/EdgeDetectorCompassProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Convolution/EdgeDetectorCompassProcessor{TPixel}.cs index c4da1e4b0..f15acd39a 100644 --- a/src/ImageSharp/Processing/Processors/Convolution/EdgeDetectorCompassProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Convolution/EdgeDetectorCompassProcessor{TPixel}.cs @@ -79,7 +79,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution } var operation = new RowIntervalOperation(source.PixelBuffer, pass.PixelBuffer, interest); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( this.Configuration, interest, in operation); diff --git a/src/ImageSharp/Processing/Processors/Dithering/OrderedDither.cs b/src/ImageSharp/Processing/Processors/Dithering/OrderedDither.cs index 69e323bd5..4e5cfefdf 100644 --- a/src/ImageSharp/Processing/Processors/Dithering/OrderedDither.cs +++ b/src/ImageSharp/Processing/Processors/Dithering/OrderedDither.cs @@ -121,7 +121,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Dithering palette, ImageMaths.GetBitsNeededForColorDepth(palette.Span.Length)); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( quantizer.Configuration, bounds, in ditherOperation); @@ -145,7 +145,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Dithering scale, ImageMaths.GetBitsNeededForColorDepth(palette.Span.Length)); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, bounds, in ditherOperation); diff --git a/src/ImageSharp/Processing/Processors/Drawing/DrawImageProcessor{TPixelBg,TPixelFg}.cs b/src/ImageSharp/Processing/Processors/Drawing/DrawImageProcessor{TPixelBg,TPixelFg}.cs index c1ce30cae..7a26a03a1 100644 --- a/src/ImageSharp/Processing/Processors/Drawing/DrawImageProcessor{TPixelBg,TPixelFg}.cs +++ b/src/ImageSharp/Processing/Processors/Drawing/DrawImageProcessor{TPixelBg,TPixelFg}.cs @@ -100,7 +100,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Drawing } var operation = new RowIntervalOperation(source, targetImage, blender, configuration, minX, width, locationY, targetX, this.Opacity); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, workingRect, in operation); diff --git a/src/ImageSharp/Processing/Processors/Effects/OilPaintingProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Effects/OilPaintingProcessor{TPixel}.cs index 50c0a22d3..42bd4de6d 100644 --- a/src/ImageSharp/Processing/Processors/Effects/OilPaintingProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Effects/OilPaintingProcessor{TPixel}.cs @@ -48,7 +48,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Effects source.CopyTo(targetPixels); var operation = new RowIntervalOperation(this.SourceRectangle, targetPixels, source, this.Configuration, brushSize >> 1, this.definition.Levels); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( this.Configuration, this.SourceRectangle, in operation); diff --git a/src/ImageSharp/Processing/Processors/Effects/PixelRowDelegateProcessor{TPixel,TDelegate}.cs b/src/ImageSharp/Processing/Processors/Effects/PixelRowDelegateProcessor{TPixel,TDelegate}.cs index 44ade727a..f94cd5080 100644 --- a/src/ImageSharp/Processing/Processors/Effects/PixelRowDelegateProcessor{TPixel,TDelegate}.cs +++ b/src/ImageSharp/Processing/Processors/Effects/PixelRowDelegateProcessor{TPixel,TDelegate}.cs @@ -52,7 +52,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Effects var interest = Rectangle.Intersect(this.SourceRectangle, source.Bounds()); var operation = new RowIntervalOperation(interest.X, source, this.Configuration, this.modifiers, this.rowDelegate); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( this.Configuration, interest, in operation); diff --git a/src/ImageSharp/Processing/Processors/Filters/FilterProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Filters/FilterProcessor{TPixel}.cs index 19142ceb0..a677f6027 100644 --- a/src/ImageSharp/Processing/Processors/Filters/FilterProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Filters/FilterProcessor{TPixel}.cs @@ -38,7 +38,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Filters var interest = Rectangle.Intersect(this.SourceRectangle, source.Bounds()); var operation = new RowIntervalOperation(interest.X, source, this.definition.Matrix, this.Configuration); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( this.Configuration, interest, in operation); diff --git a/src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationProcessor{TPixel}.cs index eb666a4f1..362a62ff9 100644 --- a/src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Normalization/AdaptiveHistogramEqualizationProcessor{TPixel}.cs @@ -81,7 +81,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization } var operation = new RowIntervalOperation(cdfData, tileYStartPositions, tileWidth, tileHeight, tileCount, halfTileWidth, luminanceLevels, source); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( this.Configuration, new Rectangle(0, 0, sourceWidth, tileYStartPositions.Count), in operation); @@ -522,7 +522,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization this.luminanceLevels, source); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( this.configuration, new Rectangle(0, 0, this.sourceWidth, this.tileYStartPositions.Count), in operation); diff --git a/src/ImageSharp/Processing/Processors/Normalization/GlobalHistogramEqualizationProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Normalization/GlobalHistogramEqualizationProcessor{TPixel}.cs index 07fa55c5d..0567151bc 100644 --- a/src/ImageSharp/Processing/Processors/Normalization/GlobalHistogramEqualizationProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Normalization/GlobalHistogramEqualizationProcessor{TPixel}.cs @@ -53,7 +53,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization // Build the histogram of the grayscale levels var grayscaleOperation = new GrayscaleLevelsRowIntervalOperation(interest, histogramBuffer, source, this.LuminanceLevels); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( this.Configuration, interest, in grayscaleOperation); @@ -76,7 +76,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Normalization // Apply the cdf to each pixel of the image var cdfOperation = new CdfApplicationRowIntervalOperation(interest, cdfBuffer, source, this.LuminanceLevels, numberOfPixelsMinusCdfMin); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( this.Configuration, interest, in cdfOperation); diff --git a/src/ImageSharp/Processing/Processors/Overlays/BackgroundColorProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Overlays/BackgroundColorProcessor{TPixel}.cs index b796016d1..3f4174d6e 100644 --- a/src/ImageSharp/Processing/Processors/Overlays/BackgroundColorProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Overlays/BackgroundColorProcessor{TPixel}.cs @@ -50,7 +50,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Overlays PixelBlender blender = PixelOperations.Instance.GetPixelBlender(graphicsOptions); var operation = new RowIntervalOperation(configuration, interest, blender, amount, colors, source); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, interest, in operation); diff --git a/src/ImageSharp/Processing/Processors/Overlays/GlowProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Overlays/GlowProcessor{TPixel}.cs index 21a4e1345..ff148e839 100644 --- a/src/ImageSharp/Processing/Processors/Overlays/GlowProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Overlays/GlowProcessor{TPixel}.cs @@ -56,7 +56,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Overlays rowColors.GetSpan().Fill(glowColor); var operation = new RowIntervalOperation(configuration, interest, rowColors, this.blender, center, maxDistance, blendPercent, source); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, interest, in operation); diff --git a/src/ImageSharp/Processing/Processors/Overlays/VignetteProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Overlays/VignetteProcessor{TPixel}.cs index 3515a2891..ce69de2fd 100644 --- a/src/ImageSharp/Processing/Processors/Overlays/VignetteProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Overlays/VignetteProcessor{TPixel}.cs @@ -64,7 +64,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Overlays rowColors.GetSpan().Fill(vignetteColor); var operation = new RowIntervalOperation(configuration, interest, rowColors, this.blender, center, maxDistance, blendPercent, source); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, interest, in operation); diff --git a/src/ImageSharp/Processing/Processors/Quantization/FrameQuantizerExtensions.cs b/src/ImageSharp/Processing/Processors/Quantization/FrameQuantizerExtensions.cs index 5b49fe9e8..8dd6d984e 100644 --- a/src/ImageSharp/Processing/Processors/Quantization/FrameQuantizerExtensions.cs +++ b/src/ImageSharp/Processing/Processors/Quantization/FrameQuantizerExtensions.cs @@ -74,7 +74,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Quantization if (dither is null) { var operation = new RowIntervalOperation(quantizer, source, output, bounds, palette); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( quantizer.Configuration, bounds, in operation); diff --git a/src/ImageSharp/Processing/Processors/Quantization/QuantizeProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Quantization/QuantizeProcessor{TPixel}.cs index bfcc26ae2..da191728f 100644 --- a/src/ImageSharp/Processing/Processors/Quantization/QuantizeProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Quantization/QuantizeProcessor{TPixel}.cs @@ -42,7 +42,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Quantization using QuantizedFrame quantized = frameQuantizer.QuantizeFrame(source, interest); var operation = new RowIntervalOperation(this.SourceRectangle, source, quantized); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, interest, in operation); diff --git a/src/ImageSharp/Processing/Processors/Transforms/CropProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Transforms/CropProcessor{TPixel}.cs index a80eef2bc..d72790ea1 100644 --- a/src/ImageSharp/Processing/Processors/Transforms/CropProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Transforms/CropProcessor{TPixel}.cs @@ -53,7 +53,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms var operation = new RowIntervalOperation(bounds, source, destination); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( bounds, in parallelSettings, in operation); diff --git a/src/ImageSharp/Processing/Processors/Transforms/Linear/AffineTransformProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Transforms/Linear/AffineTransformProcessor{TPixel}.cs index 72bfa4c0b..26475922f 100644 --- a/src/ImageSharp/Processing/Processors/Transforms/Linear/AffineTransformProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Transforms/Linear/AffineTransformProcessor{TPixel}.cs @@ -72,7 +72,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms if (sampler is NearestNeighborResampler) { var nnOperation = new NNAffineOperation(source, destination, matrix); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, destination.Bounds(), in nnOperation); @@ -105,7 +105,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms radialExtents, maxSourceExtents); - ParallelRowIterator.IterateRows, Vector4>( + ParallelRowIterator.IterateRowIntervals, Vector4>( configuration, destination.Bounds(), in operation); diff --git a/src/ImageSharp/Processing/Processors/Transforms/Linear/FlipProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Transforms/Linear/FlipProcessor{TPixel}.cs index 877fa074e..f5fde8a22 100644 --- a/src/ImageSharp/Processing/Processors/Transforms/Linear/FlipProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Transforms/Linear/FlipProcessor{TPixel}.cs @@ -77,7 +77,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms private void FlipY(ImageFrame source, Configuration configuration) { var operation = new RowIntervalOperation(source); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, source.Bounds(), in operation); diff --git a/src/ImageSharp/Processing/Processors/Transforms/Linear/ProjectiveTransformProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Transforms/Linear/ProjectiveTransformProcessor{TPixel}.cs index b3315fa55..07178117a 100644 --- a/src/ImageSharp/Processing/Processors/Transforms/Linear/ProjectiveTransformProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Transforms/Linear/ProjectiveTransformProcessor{TPixel}.cs @@ -72,7 +72,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms if (sampler is NearestNeighborResampler) { var nnOperation = new NNProjectiveOperation(source, destination, matrix); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, destination.Bounds(), in nnOperation); @@ -105,7 +105,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms radialExtents, maxSourceExtents); - ParallelRowIterator.IterateRows, Vector4>( + ParallelRowIterator.IterateRowIntervals, Vector4>( configuration, destination.Bounds(), in operation); diff --git a/src/ImageSharp/Processing/Processors/Transforms/Linear/RotateProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Transforms/Linear/RotateProcessor{TPixel}.cs index 198e142d0..d6755e8ba 100644 --- a/src/ImageSharp/Processing/Processors/Transforms/Linear/RotateProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Transforms/Linear/RotateProcessor{TPixel}.cs @@ -132,7 +132,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms private void Rotate180(ImageFrame source, ImageFrame destination, Configuration configuration) { var operation = new Rotate180RowIntervalOperation(source.Width, source.Height, source, destination); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, source.Bounds(), in operation); @@ -147,7 +147,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms private void Rotate270(ImageFrame source, ImageFrame destination, Configuration configuration) { var operation = new Rotate270RowIntervalOperation(destination.Bounds(), source.Width, source.Height, source, destination); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, source.Bounds(), in operation); @@ -162,7 +162,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms private void Rotate90(ImageFrame source, ImageFrame destination, Configuration configuration) { var operation = new Rotate90RowIntervalOperation(destination.Bounds(), source.Width, source.Height, source, destination); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, source.Bounds(), in operation); diff --git a/src/ImageSharp/Processing/Processors/Transforms/Resize/ResizeProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/Transforms/Resize/ResizeProcessor{TPixel}.cs index 1a6b8030d..c0dc88688 100644 --- a/src/ImageSharp/Processing/Processors/Transforms/Resize/ResizeProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/Transforms/Resize/ResizeProcessor{TPixel}.cs @@ -152,7 +152,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Transforms source, destination); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, interest, in operation); diff --git a/tests/ImageSharp.Tests/Helpers/ParallelRowIteratorTests.cs b/tests/ImageSharp.Tests/Helpers/ParallelRowIteratorTests.cs index 332a141e9..08d64a738 100644 --- a/tests/ImageSharp.Tests/Helpers/ParallelRowIteratorTests.cs +++ b/tests/ImageSharp.Tests/Helpers/ParallelRowIteratorTests.cs @@ -78,7 +78,7 @@ namespace SixLabors.ImageSharp.Tests.Helpers var operation = new TestRowIntervalOperation(RowAction); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( rectangle, in parallelSettings, in operation); @@ -116,7 +116,7 @@ namespace SixLabors.ImageSharp.Tests.Helpers var operation = new TestRowIntervalOperation(RowAction); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( rectangle, in parallelSettings, in operation); @@ -157,7 +157,7 @@ namespace SixLabors.ImageSharp.Tests.Helpers var operation = new TestRowIntervalOperation(RowAction); - ParallelRowIterator.IterateRows, Vector4>( + ParallelRowIterator.IterateRowIntervals, Vector4>( rectangle, in parallelSettings, in operation); @@ -195,7 +195,7 @@ namespace SixLabors.ImageSharp.Tests.Helpers var operation = new TestRowIntervalOperation(RowAction); - ParallelRowIterator.IterateRows, Vector4>( + ParallelRowIterator.IterateRowIntervals, Vector4>( rectangle, in parallelSettings, in operation); @@ -249,7 +249,7 @@ namespace SixLabors.ImageSharp.Tests.Helpers var operation = new TestRowIntervalOperation(RowAction); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( rectangle, in parallelSettings, in operation); @@ -291,7 +291,7 @@ namespace SixLabors.ImageSharp.Tests.Helpers var operation = new TestRowIntervalOperation(RowAction); - ParallelRowIterator.IterateRows, Vector4>( + ParallelRowIterator.IterateRowIntervals, Vector4>( rectangle, in parallelSettings, in operation); @@ -355,7 +355,7 @@ namespace SixLabors.ImageSharp.Tests.Helpers var operation = new TestRowIntervalOperation(RowAction); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( rect, settings, in operation); @@ -383,7 +383,7 @@ namespace SixLabors.ImageSharp.Tests.Helpers var operation = new TestRowIntervalOperation(RowAction); ArgumentOutOfRangeException ex = Assert.Throws( - () => ParallelRowIterator.IterateRows(rect, in parallelSettings, in operation)); + () => ParallelRowIterator.IterateRowIntervals(rect, in parallelSettings, in operation)); Assert.Contains(width <= 0 ? "Width" : "Height", ex.Message); } @@ -406,7 +406,7 @@ namespace SixLabors.ImageSharp.Tests.Helpers var operation = new TestRowIntervalOperation(RowAction); ArgumentOutOfRangeException ex = Assert.Throws( - () => ParallelRowIterator.IterateRows, Rgba32>(rect, in parallelSettings, in operation)); + () => ParallelRowIterator.IterateRowIntervals, Rgba32>(rect, in parallelSettings, in operation)); Assert.Contains(width <= 0 ? "Width" : "Height", ex.Message); } diff --git a/tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs b/tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs index 502a5bf46..460516568 100644 --- a/tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs +++ b/tests/ImageSharp.Tests/TestUtilities/TestImageExtensions.cs @@ -713,7 +713,7 @@ namespace SixLabors.ImageSharp.Tests var operation = new RowOperation(configuration, sourceRectangle, source); - ParallelRowIterator.IterateRows( + ParallelRowIterator.IterateRowIntervals( configuration, sourceRectangle, in operation);