Browse Source

Removed execution mode field in pixel specific processor

pull/1058/head
Sergio Pedri 7 years ago
parent
commit
3cb81c3b40
  1. 12
      src/ImageSharp/Processing/Processors/Convolution/BokehBlurProcessor{TPixel}.cs

12
src/ImageSharp/Processing/Processors/Convolution/BokehBlurProcessor{TPixel}.cs

@ -36,11 +36,6 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
/// </summary>
private readonly float gamma;
/// <summary>
/// The execution mode to use when applying the effect
/// </summary>
private readonly BokehBlurExecutionMode executionMode;
/// <summary>
/// The maximum size of the kernel in either direction
/// </summary>
@ -84,7 +79,6 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
this.kernelSize = (this.radius * 2) + 1;
this.componentsCount = definition.Components;
this.gamma = definition.Gamma;
this.executionMode = definition.ExecutionMode;
// Reuse the initialized values from the cache, if possible
var parameters = new BokehBlurParameters(this.radius, this.componentsCount);
@ -396,12 +390,6 @@ namespace SixLabors.ImageSharp.Processing.Processors.Convolution
var workingRectangle = Rectangle.FromLTRB(startX, startY, endX, endY);
int width = workingRectangle.Width;
if (this.executionMode == BokehBlurExecutionMode.PreferLowMemoryUsage)
{
configuration = configuration.Clone();
configuration.MaxDegreeOfParallelism = 1;
}
ParallelHelper.IterateRows(
workingRectangle,
configuration,

Loading…
Cancel
Save