diff --git a/tests/ImageSharp.Benchmarks/Processing/ParallelProcessing.cs b/tests/ImageSharp.Benchmarks/Processing/ParallelProcessing.cs index 14635136a5..4f2089713d 100644 --- a/tests/ImageSharp.Benchmarks/Processing/ParallelProcessing.cs +++ b/tests/ImageSharp.Benchmarks/Processing/ParallelProcessing.cs @@ -11,6 +11,7 @@ namespace SixLabors.ImageSharp.Benchmarks; public class ParallelProcessing { private Image image; + private Image foreground; private Configuration configuration; public static IEnumerable MaxDegreeOfParallelismValues() @@ -34,6 +35,7 @@ public class ParallelProcessing public void Setup() { this.image = new Image(2048, 2048); + this.foreground = new Image(2048, 2048); this.configuration = Configuration.Default.Clone(); this.configuration.MaxDegreeOfParallelism = this.MaxDegreeOfParallelism; } @@ -41,6 +43,9 @@ public class ParallelProcessing [Benchmark] public void DetectEdges() => this.image.Mutate(this.configuration, x => x.DetectEdges()); + [Benchmark] + public void DrawImage() => this.image.Mutate(this.configuration, x => x.DrawImage(this.foreground, 0.5f)); + [Benchmark] public void Crop() { @@ -52,5 +57,9 @@ public class ParallelProcessing } [GlobalCleanup] - public void Cleanup() => this.image.Dispose(); + public void Cleanup() + { + this.image.Dispose(); + this.foreground.Dispose(); + } }