Skip to content

Commit 79448ec

Browse files
committed
Revert adding JsonConstructor attributes
1 parent ba7b1df commit 79448ec

File tree

7 files changed

+0
-71
lines changed

7 files changed

+0
-71
lines changed

src/ImageSharp/Formats/Webp/Lossy/Vp8BandProbas.cs

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

4-
using System.Text.Json.Serialization;
5-
64
namespace SixLabors.ImageSharp.Formats.Webp.Lossy;
75

86
/// <summary>
@@ -22,13 +20,6 @@ public Vp8BandProbas()
2220
}
2321
}
2422

25-
/// <summary>
26-
/// Initializes a new instance of the <see cref="Vp8BandProbas"/> class.
27-
/// Only used for unit tests.
28-
/// </summary>
29-
[JsonConstructor]
30-
public Vp8BandProbas(Vp8ProbaArray[] probabilities) => this.Probabilities = probabilities;
31-
3223
/// <summary>
3324
/// Gets the Probabilities.
3425
/// </summary>
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4-
using System.Text.Json.Serialization;
5-
64
namespace SixLabors.ImageSharp.Formats.Webp.Lossy;
75

86
internal class Vp8CostArray
@@ -12,12 +10,5 @@ internal class Vp8CostArray
1210
/// </summary>
1311
public Vp8CostArray() => this.Costs = new ushort[67 + 1];
1412

15-
/// <summary>
16-
/// Initializes a new instance of the <see cref="Vp8CostArray"/> class.
17-
/// Only used for unit tests.
18-
/// </summary>
19-
[JsonConstructor]
20-
public Vp8CostArray(ushort[] costs) => this.Costs = costs;
21-
2213
public ushort[] Costs { get; }
2314
}

src/ImageSharp/Formats/Webp/Lossy/Vp8Costs.cs

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

4-
using System.Text.Json.Serialization;
5-
64
namespace SixLabors.ImageSharp.Formats.Webp.Lossy;
75

86
internal class Vp8Costs
@@ -19,13 +17,6 @@ public Vp8Costs()
1917
}
2018
}
2119

22-
/// <summary>
23-
/// Initializes a new instance of the <see cref="Vp8Costs"/> class.
24-
/// Only used for unit tests.
25-
/// </summary>
26-
[JsonConstructor]
27-
public Vp8Costs(Vp8CostArray[] costs) => this.Costs = costs;
28-
2920
/// <summary>
3021
/// Gets the Costs.
3122
/// </summary>

src/ImageSharp/Formats/Webp/Lossy/Vp8ProbaArray.cs

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

4-
using System.Text.Json.Serialization;
5-
64
namespace SixLabors.ImageSharp.Formats.Webp.Lossy;
75

86
/// <summary>
@@ -15,13 +13,6 @@ internal class Vp8ProbaArray
1513
/// </summary>
1614
public Vp8ProbaArray() => this.Probabilities = new byte[WebpConstants.NumProbas];
1715

18-
/// <summary>
19-
/// Initializes a new instance of the <see cref="Vp8ProbaArray"/> class.
20-
/// Only used for unit tests.
21-
/// </summary>
22-
[JsonConstructor]
23-
public Vp8ProbaArray(byte[] probabilities) => this.Probabilities = probabilities;
24-
2516
/// <summary>
2617
/// Gets the probabilities.
2718
/// </summary>

src/ImageSharp/Formats/Webp/Lossy/Vp8Residual.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using System.Runtime.InteropServices;
88
using System.Runtime.Intrinsics;
99
using System.Runtime.Intrinsics.X86;
10-
using System.Text.Json.Serialization;
1110

1211
namespace SixLabors.ImageSharp.Formats.Webp.Lossy;
1312

@@ -16,22 +15,6 @@ namespace SixLabors.ImageSharp.Formats.Webp.Lossy;
1615
/// </summary>
1716
internal class Vp8Residual
1817
{
19-
public Vp8Residual()
20-
{
21-
}
22-
23-
[JsonConstructor]
24-
public Vp8Residual(int first, int last, int coeffType, short[] coeffs, Vp8BandProbas[] prob, Vp8Stats[] stats, Vp8Costs[] costs)
25-
{
26-
this.First = first;
27-
this.Last = last;
28-
this.CoeffType = coeffType;
29-
this.Coeffs = coeffs;
30-
this.Prob = prob;
31-
this.Stats = stats;
32-
this.Costs = costs;
33-
}
34-
3518
public int First { get; set; }
3619

3720
public int Last { get; set; }
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4-
using System.Text.Json.Serialization;
5-
64
namespace SixLabors.ImageSharp.Formats.Webp.Lossy;
75

86
internal class Vp8Stats
@@ -19,12 +17,5 @@ public Vp8Stats()
1917
}
2018
}
2119

22-
/// <summary>
23-
/// Initializes a new instance of the <see cref="Vp8Stats"/> class.
24-
/// Only used for unit tests.
25-
/// </summary>
26-
[JsonConstructor]
27-
public Vp8Stats(Vp8StatsArray[] stats) => this.Stats = stats;
28-
2920
public Vp8StatsArray[] Stats { get; }
3021
}
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

4-
using System.Text.Json.Serialization;
5-
64
namespace SixLabors.ImageSharp.Formats.Webp.Lossy;
75

86
internal class Vp8StatsArray
@@ -12,12 +10,5 @@ internal class Vp8StatsArray
1210
/// </summary>
1311
public Vp8StatsArray() => this.Stats = new uint[WebpConstants.NumProbas];
1412

15-
/// <summary>
16-
/// Initializes a new instance of the <see cref="Vp8StatsArray"/> class.
17-
/// Only used for unit tests.
18-
/// </summary>
19-
[JsonConstructor]
20-
public Vp8StatsArray(uint[] stats) => this.Stats = stats;
21-
2213
public uint[] Stats { get; }
2314
}

0 commit comments

Comments
 (0)