Browse Source

Match AggressiveInlining usage to main pixel classes

af/merge-core
Jason Nelson 8 years ago
parent
commit
0b31c8c3c5
  1. 2
      src/ImageSharp/ColorSpaces/CieLab.cs
  2. 2
      src/ImageSharp/ColorSpaces/CieLchuv.cs
  3. 2
      src/ImageSharp/ColorSpaces/CieLuv.cs
  4. 3
      src/ImageSharp/ColorSpaces/CieXyChromaticityCoordinates.cs
  5. 3
      src/ImageSharp/ColorSpaces/CieXyy.cs
  6. 3
      src/ImageSharp/ColorSpaces/CieXyz.cs
  7. 1
      src/ImageSharp/ColorSpaces/Cmyk.cs
  8. 3
      src/ImageSharp/ColorSpaces/Hsl.cs
  9. 3
      src/ImageSharp/ColorSpaces/Hsv.cs
  10. 2
      src/ImageSharp/ColorSpaces/HunterLab.cs
  11. 3
      src/ImageSharp/ColorSpaces/LinearRgb.cs
  12. 2
      src/ImageSharp/ColorSpaces/Lms.cs
  13. 2
      src/ImageSharp/ColorSpaces/Rgb.cs
  14. 3
      src/ImageSharp/ColorSpaces/YCbCr.cs

2
src/ImageSharp/ColorSpaces/CieLab.cs

@ -129,6 +129,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is equal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator ==(CieLab left, CieLab right)
{
return left.Equals(right);
@ -146,6 +147,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is unequal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator !=(CieLab left, CieLab right)
{
return !left.Equals(right);

2
src/ImageSharp/ColorSpaces/CieLchuv.cs

@ -152,6 +152,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
}
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public override int GetHashCode()
{
return HashHelpers.Combine(this.WhitePoint.GetHashCode(), this.backingVector.GetHashCode());
@ -172,6 +173,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
}
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool Equals(CieLchuv other)
{
return this.backingVector.Equals(other.backingVector)

2
src/ImageSharp/ColorSpaces/CieLuv.cs

@ -131,6 +131,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is equal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator ==(CieLuv left, CieLuv right)
{
return left.Equals(right);
@ -148,6 +149,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is unequal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator !=(CieLuv left, CieLuv right)
{
return !left.Equals(right);

3
src/ImageSharp/ColorSpaces/CieXyChromaticityCoordinates.cs

@ -94,12 +94,14 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is unequal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator !=(CieXyChromaticityCoordinates left, CieXyChromaticityCoordinates right)
{
return !left.Equals(right);
}
/// <inheritdoc />
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public override int GetHashCode()
{
return this.backingVector.GetHashCode();
@ -120,6 +122,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
}
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool Equals(CieXyChromaticityCoordinates other)
{
// The memberwise comparison here is a workaround for https://github.com/dotnet/coreclr/issues/16443

3
src/ImageSharp/ColorSpaces/CieXyy.cs

@ -88,6 +88,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is equal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator ==(CieXyy left, CieXyy right)
{
return left.Equals(right);
@ -105,12 +106,14 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is unequal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator !=(CieXyy left, CieXyy right)
{
return !left.Equals(right);
}
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public override int GetHashCode()
{
return this.backingVector.GetHashCode();

3
src/ImageSharp/ColorSpaces/CieXyz.cs

@ -91,6 +91,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is equal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator ==(CieXyz left, CieXyz right)
{
return left.Equals(right);
@ -108,12 +109,14 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is unequal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator !=(CieXyz left, CieXyz right)
{
return !left.Equals(right);
}
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public override int GetHashCode()
{
return this.backingVector.GetHashCode();

1
src/ImageSharp/ColorSpaces/Cmyk.cs

@ -119,6 +119,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
}
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public override int GetHashCode()
{
return this.backingVector.GetHashCode();

3
src/ImageSharp/ColorSpaces/Hsl.cs

@ -90,6 +90,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is equal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator ==(Hsl left, Hsl right)
{
return left.Equals(right);
@ -107,12 +108,14 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is unequal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator !=(Hsl left, Hsl right)
{
return !left.Equals(right);
}
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public override int GetHashCode()
{
return this.backingVector.GetHashCode();

3
src/ImageSharp/ColorSpaces/Hsv.cs

@ -146,6 +146,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is equal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator ==(Hsv left, Hsv right)
{
return left.Equals(right);
@ -163,12 +164,14 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is unequal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator !=(Hsv left, Hsv right)
{
return !left.Equals(right);
}
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public override int GetHashCode()
{
return this.backingVector.GetHashCode();

2
src/ImageSharp/ColorSpaces/HunterLab.cs

@ -142,12 +142,14 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is unequal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator !=(HunterLab left, HunterLab right)
{
return !left.Equals(right);
}
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public override int GetHashCode()
{
return HashHelpers.Combine(this.WhitePoint.GetHashCode(), this.backingVector.GetHashCode());

3
src/ImageSharp/ColorSpaces/LinearRgb.cs

@ -122,6 +122,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is equal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator ==(LinearRgb left, LinearRgb right)
{
return left.Equals(right);
@ -139,12 +140,14 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is unequal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator !=(LinearRgb left, LinearRgb right)
{
return !left.Equals(right);
}
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public override int GetHashCode()
{
return this.backingVector.GetHashCode();

2
src/ImageSharp/ColorSpaces/Lms.cs

@ -89,6 +89,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is equal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator ==(Lms left, Lms right)
{
return left.Equals(right);
@ -106,6 +107,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is unequal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator !=(Lms left, Lms right)
{
return !left.Equals(right);

2
src/ImageSharp/ColorSpaces/Rgb.cs

@ -140,6 +140,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is equal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator ==(Rgb left, Rgb right)
{
return left.Equals(right);
@ -157,6 +158,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is unequal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator !=(Rgb left, Rgb right)
{
return !left.Equals(right);

3
src/ImageSharp/ColorSpaces/YCbCr.cs

@ -109,12 +109,14 @@ namespace SixLabors.ImageSharp.ColorSpaces
/// <returns>
/// True if the current left is unequal to the <paramref name="right"/> parameter; otherwise, false.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool operator !=(YCbCr left, YCbCr right)
{
return !left.Equals(right);
}
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public override int GetHashCode()
{
return this.backingVector.GetHashCode();
@ -135,6 +137,7 @@ namespace SixLabors.ImageSharp.ColorSpaces
}
/// <inheritdoc/>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public bool Equals(YCbCr other)
{
return this.backingVector.Equals(other.backingVector);

Loading…
Cancel
Save