Skip to content

Commit 3448ea4

Browse files
Don't exclude, just suppress.
1 parent 9be7d84 commit 3448ea4

22 files changed

+8
-53
lines changed

tests/ImageSharp.Benchmarks/Codecs/Bmp/DecodeBmp.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4-
#if OS_WINDOWS
54
using BenchmarkDotNet.Attributes;
65
using SixLabors.ImageSharp.PixelFormats;
76
using SixLabors.ImageSharp.Tests;
@@ -41,4 +40,3 @@ public Size BmpImageSharp()
4140
return new Size(image.Width, image.Height);
4241
}
4342
}
44-
#endif

tests/ImageSharp.Benchmarks/Codecs/Bmp/EncodeBmp.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4-
#if OS_WINDOWS
54
using System.Drawing.Imaging;
65
using BenchmarkDotNet.Attributes;
76
using SixLabors.ImageSharp.PixelFormats;
@@ -52,4 +51,3 @@ public void BmpImageSharp()
5251
this.bmpCore.SaveAsBmp(memoryStream);
5352
}
5453
}
55-
#endif

tests/ImageSharp.Benchmarks/Codecs/Bmp/EncodeBmpMultiple.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4-
#if OS_WINDOWS
54
using System.Drawing.Imaging;
65
using BenchmarkDotNet.Attributes;
76
using SixLabors.ImageSharp.Formats.Bmp;
@@ -29,4 +28,3 @@ public void EncodeBmpSystemDrawing()
2928
return null;
3029
});
3130
}
32-
#endif

tests/ImageSharp.Benchmarks/Codecs/Gif/DecodeGif.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4-
#if OS_WINDOWS
54
using BenchmarkDotNet.Attributes;
65
using SixLabors.ImageSharp.PixelFormats;
76
using SixLabors.ImageSharp.Tests;
@@ -19,15 +18,9 @@ private string TestImageFullPath
1918
=> Path.Combine(TestEnvironment.InputImagesDirectoryFullPath, this.TestImage);
2019

2120
[GlobalSetup]
22-
public void ReadImages()
23-
{
24-
if (this.gifBytes == null)
25-
{
26-
this.gifBytes = File.ReadAllBytes(this.TestImageFullPath);
27-
}
28-
}
21+
public void ReadImages() => this.gifBytes ??= File.ReadAllBytes(this.TestImageFullPath);
2922

30-
[Params(TestImages.Gif.Rings)]
23+
[Params(TestImages.Gif.Cheers)]
3124
public string TestImage { get; set; }
3225

3326
[Benchmark(Baseline = true, Description = "System.Drawing Gif")]
@@ -46,4 +39,3 @@ public Size GifImageSharp()
4639
return new Size(image.Width, image.Height);
4740
}
4841
}
49-
#endif

tests/ImageSharp.Benchmarks/Codecs/Gif/EncodeGif.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4-
#if OS_WINDOWS
54
using System.Drawing.Imaging;
65
using BenchmarkDotNet.Attributes;
76
using SixLabors.ImageSharp.Formats.Gif;
@@ -65,4 +64,3 @@ public void GifImageSharp()
6564
this.bmpCore.SaveAsGif(memoryStream, this.encoder);
6665
}
6766
}
68-
#endif

tests/ImageSharp.Benchmarks/Codecs/Gif/EncodeGifMultiple.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4-
#if OS_WINDOWS
54
using System.Drawing.Imaging;
65
using BenchmarkDotNet.Attributes;
76
using SixLabors.ImageSharp.Formats.Gif;
@@ -40,4 +39,3 @@ public void EncodeGifSystemDrawing()
4039
return null;
4140
});
4241
}
43-
#endif

tests/ImageSharp.Benchmarks/Codecs/Jpeg/DecodeJpegParseStreamOnly.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4-
#if OS_WINDOWS
54
using BenchmarkDotNet.Attributes;
65
using SixLabors.ImageSharp.Formats.Jpeg;
76
using SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder;
@@ -66,7 +65,7 @@ public override void PrepareForDecoding()
6665
}
6766
}
6867
}
69-
#endif
68+
7069
/*
7170
BenchmarkDotNet=v0.13.0, OS=Windows 10.0.19042.1083 (20H2/October2020Update)
7271
Intel Core i7-6700K CPU 4.00GHz (Skylake), 1 CPU, 8 logical and 4 physical cores

tests/ImageSharp.Benchmarks/Codecs/Jpeg/DecodeJpeg_Aggregate.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4-
#if OS_WINDOWS
54
using BenchmarkDotNet.Attributes;
65
using SixLabors.ImageSharp.PixelFormats;
76
using SixLabors.ImageSharp.Tests;
@@ -38,4 +37,3 @@ public void ImageSharp()
3837
public void SystemDrawing()
3938
=> this.ForEachStream(SDImage.FromStream);
4039
}
41-
#endif

tests/ImageSharp.Benchmarks/Codecs/Jpeg/DecodeJpeg_ImageSpecific.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4-
#if OS_WINDOWS
54
using BenchmarkDotNet.Attributes;
65
using SixLabors.ImageSharp.Formats;
76
using SixLabors.ImageSharp.Tests;
@@ -67,4 +66,3 @@ public Size ImageSharp()
6766
| 'Decode Jpeg - ImageSharp' | Jpg/i(...)e.jpg [43] | 276.490 ms | 195.5104 ms | 10.7166 ms | 0.71 | 0.01 | - | - | - | 36022368 B |
6867
*/
6968
}
70-
#endif

tests/ImageSharp.Benchmarks/Codecs/MultiImageBenchmarkBase.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4-
#if OS_WINDOWS
54
using System.Drawing;
65
using System.Numerics;
76
using BenchmarkDotNet.Attributes;
@@ -237,4 +236,3 @@ protected void ForEachSystemDrawingImage(Func<Bitmap, MemoryStream, object> oper
237236
}
238237
}
239238
}
240-
#endif

0 commit comments

Comments
 (0)