@ -318,15 +318,16 @@ namespace SixLabors.ImageSharp
/// <param name="value">The value to initialize the bitmap with.</param>
internal void Clear(ParallelOptions parallelOptions, TPixel value)
{
Parallel.For(
0,
this.Height,
parallelOptions,
y =>
Span<TPixel> targetRow = this.GetPixelRowSpan(y);
targetRow.Fill(value);
});
Span<TPixel> span = this.GetPixelSpan();
if (value.Equals(default))
span.Clear();
}
else
span.Fill(value);
/// <inheritdoc/>
@ -86,7 +86,6 @@ namespace SixLabors.ImageSharp.Processing.Processors.Overlays
protected override void OnFrameApply(ImageFrame<TPixel> source, Rectangle sourceRectangle, Configuration configuration)
// TODO: can we simplify the rectangle calculation?
int startY = sourceRectangle.Y;
int endY = sourceRectangle.Bottom;
int startX = sourceRectangle.X;