Browse Source

Remove aggressive inlining attributes, fix usings

pull/3153/head
winscripter 1 month ago
parent
commit
6eda7e2ad4
  1. 4
      src/ImageSharp/Formats/Jxl/Fields/JxlBitsCoder.cs
  2. 4
      src/ImageSharp/Formats/Jxl/Fields/JxlF16Coder.cs
  3. 2
      src/ImageSharp/Formats/Jxl/Fields/JxlU32Coder.cs
  4. 2
      src/ImageSharp/Formats/Jxl/Fields/JxlU64Coder.cs

4
src/ImageSharp/Formats/Jxl/Fields/JxlBitsCoder.cs

@ -1,8 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
using System.Runtime.CompilerServices; using SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder;
using SixLabors.ImageSharp.Formats.Jxl.IO;
namespace SixLabors.ImageSharp.Formats.Jxl.Fields; namespace SixLabors.ImageSharp.Formats.Jxl.Fields;
@ -17,7 +16,6 @@ internal static class JxlBitsCoder
/// </summary> /// </summary>
// Looks like that's what the function does (fields.cc:406): // Looks like that's what the function does (fields.cc:406):
// it returns whatever is passed to it. // it returns whatever is passed to it.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int MaxEncodedBits(int bits) => bits; public static int MaxEncodedBits(int bits) => bits;
public static bool CanEncode(int bits, uint value, ref int encodedBits) public static bool CanEncode(int bits, uint value, ref int encodedBits)

4
src/ImageSharp/Formats/Jxl/Fields/JxlF16Coder.cs

@ -2,7 +2,7 @@
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Formats.Jxl.IO; using SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder;
namespace SixLabors.ImageSharp.Formats.Jxl.Fields; namespace SixLabors.ImageSharp.Formats.Jxl.Fields;
@ -15,7 +15,6 @@ internal static class JxlF16Coder
/// Always returns 16, which is the maximum possible encoded bits. /// Always returns 16, which is the maximum possible encoded bits.
/// The F16 coder always reads 16 bits from the bitstream. /// The F16 coder always reads 16 bits from the bitstream.
/// </summary> /// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int MaxEncodedBits() => 16; public static int MaxEncodedBits() => 16;
/// <summary> /// <summary>
@ -24,7 +23,6 @@ internal static class JxlF16Coder
/// Also stores the maximum encodeable bits into encodedBits (which is /// Also stores the maximum encodeable bits into encodedBits (which is
/// always 16). /// always 16).
/// </summary> /// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool CanEncode(float value, ref int encodedBits) public static bool CanEncode(float value, ref int encodedBits)
{ {
encodedBits = MaxEncodedBits(); encodedBits = MaxEncodedBits();

2
src/ImageSharp/Formats/Jxl/Fields/JxlU32Coder.cs

@ -1,7 +1,6 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder; using SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder;
namespace SixLabors.ImageSharp.Formats.Jxl.Fields; namespace SixLabors.ImageSharp.Formats.Jxl.Fields;
@ -14,7 +13,6 @@ internal static class JxlU32Coder
/// <summary> /// <summary>
/// Maximum number of writeable and/or readable bits in a variable-length integer. /// Maximum number of writeable and/or readable bits in a variable-length integer.
/// </summary> /// </summary>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int MaxEncodedBits(in JxlU32Enc enc) public static int MaxEncodedBits(in JxlU32Enc enc)
{ {
int extraBits = 0; int extraBits = 0;

2
src/ImageSharp/Formats/Jxl/Fields/JxlU64Coder.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
using SixLabors.ImageSharp.Formats.Jxl.IO; using SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder;
namespace SixLabors.ImageSharp.Formats.Jxl.Fields; namespace SixLabors.ImageSharp.Formats.Jxl.Fields;

Loading…
Cancel
Save