diff --git a/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.Generated.cs b/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.Generated.cs
index ff41e70b20..2b365f1779 100644
--- a/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.Generated.cs
+++ b/src/ImageSharp/PixelFormats/PixelBlenders/PorterDuffFunctions.Generated.cs
@@ -5,6 +5,8 @@
using System.Numerics;
using System.Runtime.CompilerServices;
+using System.Runtime.Intrinsics;
+using System.Runtime.Intrinsics.X86;
namespace SixLabors.ImageSharp.PixelFormats.PixelBlenders;
@@ -26,6 +28,17 @@ internal static partial class PorterDuffFunctions
return source;
}
+ ///
+ /// Returns the result of the "NormalSrc compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 NormalSrc(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
///
/// Returns the result of the "NormalSrcAtop" compositing equation.
///
@@ -41,6 +54,21 @@ internal static partial class PorterDuffFunctions
return Atop(backdrop, source, Normal(backdrop, source));
}
+ ///
+ /// Returns the result of the "NormalSrcAtop" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 NormalSrcAtop(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Atop(backdrop, source, Normal(backdrop, source));
+ }
+
///
/// Returns the result of the "NormalSrcOver" compositing equation.
///
@@ -56,6 +84,21 @@ internal static partial class PorterDuffFunctions
return Over(backdrop, source, Normal(backdrop, source));
}
+ ///
+ /// Returns the result of the "NormalSrcOver" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 NormalSrcOver(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Over(backdrop, source, Normal(backdrop, source));
+ }
+
///
/// Returns the result of the "NormalSrcIn" compositing equation.
///
@@ -71,6 +114,17 @@ internal static partial class PorterDuffFunctions
return In(backdrop, source);
}
+ ///
+ /// Returns the result of the "NormalSrcIn" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 NormalSrcIn(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => In(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "NormalSrcOut" compositing equation.
///
@@ -86,6 +140,17 @@ internal static partial class PorterDuffFunctions
return Out(backdrop, source);
}
+ ///
+ /// Returns the result of the "NormalSrcOut" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 NormalSrcOut(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Out(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "NormalDest" compositing equation.
///
@@ -99,6 +164,19 @@ internal static partial class PorterDuffFunctions
return backdrop;
}
+ ///
+ /// Returns the result of the "NormalDest" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 NormalDest(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ return backdrop;
+ }
+
///
/// Returns the result of the "NormalDestAtop" compositing equation.
///
@@ -114,6 +192,21 @@ internal static partial class PorterDuffFunctions
return Atop(source, backdrop, Normal(source, backdrop));
}
+ ///
+ /// Returns the result of the "NormalDestAtop" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 NormalDestAtop(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Atop(source, backdrop, Normal(source, backdrop));
+ }
+
///
/// Returns the result of the "NormalDestOver" compositing equation.
///
@@ -129,6 +222,21 @@ internal static partial class PorterDuffFunctions
return Over(source, backdrop, Normal(source, backdrop));
}
+ ///
+ /// Returns the result of the "NormalDestOver" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 NormalDestOver(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Over(source, backdrop, Normal(source, backdrop));
+ }
+
///
/// Returns the result of the "NormalDestIn" compositing equation.
///
@@ -144,6 +252,17 @@ internal static partial class PorterDuffFunctions
return In(source, backdrop);
}
+ ///
+ /// Returns the result of the "NormalDestIn" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 NormalDestIn(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => In(Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl), backdrop);
+
///
/// Returns the result of the "NormalDestOut" compositing equation.
///
@@ -159,6 +278,17 @@ internal static partial class PorterDuffFunctions
return Out(source, backdrop);
}
+ ///
+ /// Returns the result of the "NormalDestOut" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 NormalDestOut(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Out(Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl), backdrop);
+
///
/// Returns the result of the "NormalXor" compositing equation.
///
@@ -174,6 +304,17 @@ internal static partial class PorterDuffFunctions
return Xor(backdrop, source);
}
+ ///
+ /// Returns the result of the "NormalXor" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 NormalXor(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Xor(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "NormalClear" compositing equation.
///
@@ -189,6 +330,17 @@ internal static partial class PorterDuffFunctions
return Clear(backdrop, source);
}
+ ///
+ /// Returns the result of the "NormalClear" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 NormalXor(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Clear(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "NormalSrc" compositing equation.
@@ -421,6 +573,17 @@ internal static partial class PorterDuffFunctions
return source;
}
+ ///
+ /// Returns the result of the "MultiplySrc compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 MultiplySrc(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
///
/// Returns the result of the "MultiplySrcAtop" compositing equation.
///
@@ -436,6 +599,21 @@ internal static partial class PorterDuffFunctions
return Atop(backdrop, source, Multiply(backdrop, source));
}
+ ///
+ /// Returns the result of the "MultiplySrcAtop" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 MultiplySrcAtop(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Atop(backdrop, source, Multiply(backdrop, source));
+ }
+
///
/// Returns the result of the "MultiplySrcOver" compositing equation.
///
@@ -451,6 +629,21 @@ internal static partial class PorterDuffFunctions
return Over(backdrop, source, Multiply(backdrop, source));
}
+ ///
+ /// Returns the result of the "MultiplySrcOver" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 MultiplySrcOver(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Over(backdrop, source, Multiply(backdrop, source));
+ }
+
///
/// Returns the result of the "MultiplySrcIn" compositing equation.
///
@@ -466,6 +659,17 @@ internal static partial class PorterDuffFunctions
return In(backdrop, source);
}
+ ///
+ /// Returns the result of the "MultiplySrcIn" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 MultiplySrcIn(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => In(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "MultiplySrcOut" compositing equation.
///
@@ -481,6 +685,17 @@ internal static partial class PorterDuffFunctions
return Out(backdrop, source);
}
+ ///
+ /// Returns the result of the "MultiplySrcOut" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 MultiplySrcOut(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Out(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "MultiplyDest" compositing equation.
///
@@ -494,6 +709,19 @@ internal static partial class PorterDuffFunctions
return backdrop;
}
+ ///
+ /// Returns the result of the "MultiplyDest" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 MultiplyDest(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ return backdrop;
+ }
+
///
/// Returns the result of the "MultiplyDestAtop" compositing equation.
///
@@ -509,6 +737,21 @@ internal static partial class PorterDuffFunctions
return Atop(source, backdrop, Multiply(source, backdrop));
}
+ ///
+ /// Returns the result of the "MultiplyDestAtop" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 MultiplyDestAtop(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Atop(source, backdrop, Multiply(source, backdrop));
+ }
+
///
/// Returns the result of the "MultiplyDestOver" compositing equation.
///
@@ -524,6 +767,21 @@ internal static partial class PorterDuffFunctions
return Over(source, backdrop, Multiply(source, backdrop));
}
+ ///
+ /// Returns the result of the "MultiplyDestOver" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 MultiplyDestOver(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Over(source, backdrop, Multiply(source, backdrop));
+ }
+
///
/// Returns the result of the "MultiplyDestIn" compositing equation.
///
@@ -539,6 +797,17 @@ internal static partial class PorterDuffFunctions
return In(source, backdrop);
}
+ ///
+ /// Returns the result of the "MultiplyDestIn" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 MultiplyDestIn(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => In(Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl), backdrop);
+
///
/// Returns the result of the "MultiplyDestOut" compositing equation.
///
@@ -554,6 +823,17 @@ internal static partial class PorterDuffFunctions
return Out(source, backdrop);
}
+ ///
+ /// Returns the result of the "MultiplyDestOut" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 MultiplyDestOut(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Out(Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl), backdrop);
+
///
/// Returns the result of the "MultiplyXor" compositing equation.
///
@@ -569,6 +849,17 @@ internal static partial class PorterDuffFunctions
return Xor(backdrop, source);
}
+ ///
+ /// Returns the result of the "MultiplyXor" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 MultiplyXor(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Xor(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "MultiplyClear" compositing equation.
///
@@ -584,6 +875,17 @@ internal static partial class PorterDuffFunctions
return Clear(backdrop, source);
}
+ ///
+ /// Returns the result of the "MultiplyClear" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 MultiplyXor(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Clear(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "MultiplySrc" compositing equation.
@@ -816,6 +1118,17 @@ internal static partial class PorterDuffFunctions
return source;
}
+ ///
+ /// Returns the result of the "AddSrc compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 AddSrc(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
///
/// Returns the result of the "AddSrcAtop" compositing equation.
///
@@ -832,52 +1145,104 @@ internal static partial class PorterDuffFunctions
}
///
- /// Returns the result of the "AddSrcOver" compositing equation.
+ /// Returns the result of the "AddSrcAtop" compositing equation.
///
/// The backdrop vector.
/// The source vector.
/// The source opacity. Range 0..1
- /// The .
+ /// The .
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static Vector4 AddSrcOver(Vector4 backdrop, Vector4 source, float opacity)
+ public static Vector256 AddSrcAtop(Vector256 backdrop, Vector256 source, Vector256 opacity)
{
- source.W *= opacity;
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
- return Over(backdrop, source, Add(backdrop, source));
+ return Atop(backdrop, source, Add(backdrop, source));
}
///
- /// Returns the result of the "AddSrcIn" compositing equation.
+ /// Returns the result of the "AddSrcOver" compositing equation.
///
/// The backdrop vector.
/// The source vector.
/// The source opacity. Range 0..1
/// The .
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static Vector4 AddSrcIn(Vector4 backdrop, Vector4 source, float opacity)
+ public static Vector4 AddSrcOver(Vector4 backdrop, Vector4 source, float opacity)
{
source.W *= opacity;
- return In(backdrop, source);
+ return Over(backdrop, source, Add(backdrop, source));
}
///
- /// Returns the result of the "AddSrcOut" compositing equation.
+ /// Returns the result of the "AddSrcOver" compositing equation.
///
/// The backdrop vector.
/// The source vector.
/// The source opacity. Range 0..1
- /// The .
+ /// The .
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static Vector4 AddSrcOut(Vector4 backdrop, Vector4 source, float opacity)
+ public static Vector256 AddSrcOver(Vector256 backdrop, Vector256 source, Vector256 opacity)
{
- source.W *= opacity;
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
- return Out(backdrop, source);
+ return Over(backdrop, source, Add(backdrop, source));
}
///
- /// Returns the result of the "AddDest" compositing equation.
+ /// Returns the result of the "AddSrcIn" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector4 AddSrcIn(Vector4 backdrop, Vector4 source, float opacity)
+ {
+ source.W *= opacity;
+
+ return In(backdrop, source);
+ }
+
+ ///
+ /// Returns the result of the "AddSrcIn" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 AddSrcIn(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => In(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
+ ///
+ /// Returns the result of the "AddSrcOut" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector4 AddSrcOut(Vector4 backdrop, Vector4 source, float opacity)
+ {
+ source.W *= opacity;
+
+ return Out(backdrop, source);
+ }
+
+ ///
+ /// Returns the result of the "AddSrcOut" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 AddSrcOut(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Out(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
+ ///
+ /// Returns the result of the "AddDest" compositing equation.
///
/// The backdrop vector.
/// The source vector.
@@ -889,6 +1254,19 @@ internal static partial class PorterDuffFunctions
return backdrop;
}
+ ///
+ /// Returns the result of the "AddDest" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 AddDest(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ return backdrop;
+ }
+
///
/// Returns the result of the "AddDestAtop" compositing equation.
///
@@ -904,6 +1282,21 @@ internal static partial class PorterDuffFunctions
return Atop(source, backdrop, Add(source, backdrop));
}
+ ///
+ /// Returns the result of the "AddDestAtop" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 AddDestAtop(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Atop(source, backdrop, Add(source, backdrop));
+ }
+
///
/// Returns the result of the "AddDestOver" compositing equation.
///
@@ -919,6 +1312,21 @@ internal static partial class PorterDuffFunctions
return Over(source, backdrop, Add(source, backdrop));
}
+ ///
+ /// Returns the result of the "AddDestOver" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 AddDestOver(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Over(source, backdrop, Add(source, backdrop));
+ }
+
///
/// Returns the result of the "AddDestIn" compositing equation.
///
@@ -934,6 +1342,17 @@ internal static partial class PorterDuffFunctions
return In(source, backdrop);
}
+ ///
+ /// Returns the result of the "AddDestIn" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 AddDestIn(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => In(Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl), backdrop);
+
///
/// Returns the result of the "AddDestOut" compositing equation.
///
@@ -949,6 +1368,17 @@ internal static partial class PorterDuffFunctions
return Out(source, backdrop);
}
+ ///
+ /// Returns the result of the "AddDestOut" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 AddDestOut(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Out(Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl), backdrop);
+
///
/// Returns the result of the "AddXor" compositing equation.
///
@@ -964,6 +1394,17 @@ internal static partial class PorterDuffFunctions
return Xor(backdrop, source);
}
+ ///
+ /// Returns the result of the "AddXor" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 AddXor(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Xor(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "AddClear" compositing equation.
///
@@ -979,6 +1420,17 @@ internal static partial class PorterDuffFunctions
return Clear(backdrop, source);
}
+ ///
+ /// Returns the result of the "AddClear" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 AddXor(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Clear(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "AddSrc" compositing equation.
@@ -1211,6 +1663,17 @@ internal static partial class PorterDuffFunctions
return source;
}
+ ///
+ /// Returns the result of the "SubtractSrc compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 SubtractSrc(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
///
/// Returns the result of the "SubtractSrcAtop" compositing equation.
///
@@ -1226,6 +1689,21 @@ internal static partial class PorterDuffFunctions
return Atop(backdrop, source, Subtract(backdrop, source));
}
+ ///
+ /// Returns the result of the "SubtractSrcAtop" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 SubtractSrcAtop(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Atop(backdrop, source, Subtract(backdrop, source));
+ }
+
///
/// Returns the result of the "SubtractSrcOver" compositing equation.
///
@@ -1241,6 +1719,21 @@ internal static partial class PorterDuffFunctions
return Over(backdrop, source, Subtract(backdrop, source));
}
+ ///
+ /// Returns the result of the "SubtractSrcOver" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 SubtractSrcOver(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Over(backdrop, source, Subtract(backdrop, source));
+ }
+
///
/// Returns the result of the "SubtractSrcIn" compositing equation.
///
@@ -1256,6 +1749,17 @@ internal static partial class PorterDuffFunctions
return In(backdrop, source);
}
+ ///
+ /// Returns the result of the "SubtractSrcIn" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 SubtractSrcIn(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => In(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "SubtractSrcOut" compositing equation.
///
@@ -1271,6 +1775,17 @@ internal static partial class PorterDuffFunctions
return Out(backdrop, source);
}
+ ///
+ /// Returns the result of the "SubtractSrcOut" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 SubtractSrcOut(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Out(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "SubtractDest" compositing equation.
///
@@ -1284,6 +1799,19 @@ internal static partial class PorterDuffFunctions
return backdrop;
}
+ ///
+ /// Returns the result of the "SubtractDest" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 SubtractDest(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ return backdrop;
+ }
+
///
/// Returns the result of the "SubtractDestAtop" compositing equation.
///
@@ -1299,6 +1827,21 @@ internal static partial class PorterDuffFunctions
return Atop(source, backdrop, Subtract(source, backdrop));
}
+ ///
+ /// Returns the result of the "SubtractDestAtop" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 SubtractDestAtop(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Atop(source, backdrop, Subtract(source, backdrop));
+ }
+
///
/// Returns the result of the "SubtractDestOver" compositing equation.
///
@@ -1314,6 +1857,21 @@ internal static partial class PorterDuffFunctions
return Over(source, backdrop, Subtract(source, backdrop));
}
+ ///
+ /// Returns the result of the "SubtractDestOver" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 SubtractDestOver(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Over(source, backdrop, Subtract(source, backdrop));
+ }
+
///
/// Returns the result of the "SubtractDestIn" compositing equation.
///
@@ -1329,6 +1887,17 @@ internal static partial class PorterDuffFunctions
return In(source, backdrop);
}
+ ///
+ /// Returns the result of the "SubtractDestIn" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 SubtractDestIn(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => In(Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl), backdrop);
+
///
/// Returns the result of the "SubtractDestOut" compositing equation.
///
@@ -1344,6 +1913,17 @@ internal static partial class PorterDuffFunctions
return Out(source, backdrop);
}
+ ///
+ /// Returns the result of the "SubtractDestOut" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 SubtractDestOut(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Out(Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl), backdrop);
+
///
/// Returns the result of the "SubtractXor" compositing equation.
///
@@ -1359,6 +1939,17 @@ internal static partial class PorterDuffFunctions
return Xor(backdrop, source);
}
+ ///
+ /// Returns the result of the "SubtractXor" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 SubtractXor(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Xor(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "SubtractClear" compositing equation.
///
@@ -1374,6 +1965,17 @@ internal static partial class PorterDuffFunctions
return Clear(backdrop, source);
}
+ ///
+ /// Returns the result of the "SubtractClear" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 SubtractXor(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Clear(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "SubtractSrc" compositing equation.
@@ -1606,6 +2208,17 @@ internal static partial class PorterDuffFunctions
return source;
}
+ ///
+ /// Returns the result of the "ScreenSrc compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 ScreenSrc(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
///
/// Returns the result of the "ScreenSrcAtop" compositing equation.
///
@@ -1621,6 +2234,21 @@ internal static partial class PorterDuffFunctions
return Atop(backdrop, source, Screen(backdrop, source));
}
+ ///
+ /// Returns the result of the "ScreenSrcAtop" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 ScreenSrcAtop(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Atop(backdrop, source, Screen(backdrop, source));
+ }
+
///
/// Returns the result of the "ScreenSrcOver" compositing equation.
///
@@ -1636,6 +2264,21 @@ internal static partial class PorterDuffFunctions
return Over(backdrop, source, Screen(backdrop, source));
}
+ ///
+ /// Returns the result of the "ScreenSrcOver" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 ScreenSrcOver(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Over(backdrop, source, Screen(backdrop, source));
+ }
+
///
/// Returns the result of the "ScreenSrcIn" compositing equation.
///
@@ -1651,6 +2294,17 @@ internal static partial class PorterDuffFunctions
return In(backdrop, source);
}
+ ///
+ /// Returns the result of the "ScreenSrcIn" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 ScreenSrcIn(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => In(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "ScreenSrcOut" compositing equation.
///
@@ -1666,6 +2320,17 @@ internal static partial class PorterDuffFunctions
return Out(backdrop, source);
}
+ ///
+ /// Returns the result of the "ScreenSrcOut" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 ScreenSrcOut(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Out(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "ScreenDest" compositing equation.
///
@@ -1679,6 +2344,19 @@ internal static partial class PorterDuffFunctions
return backdrop;
}
+ ///
+ /// Returns the result of the "ScreenDest" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 ScreenDest(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ return backdrop;
+ }
+
///
/// Returns the result of the "ScreenDestAtop" compositing equation.
///
@@ -1691,7 +2369,37 @@ internal static partial class PorterDuffFunctions
{
source.W *= opacity;
- return Atop(source, backdrop, Screen(source, backdrop));
+ return Atop(source, backdrop, Screen(source, backdrop));
+ }
+
+ ///
+ /// Returns the result of the "ScreenDestAtop" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 ScreenDestAtop(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Atop(source, backdrop, Screen(source, backdrop));
+ }
+
+ ///
+ /// Returns the result of the "ScreenDestOver" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector4 ScreenDestOver(Vector4 backdrop, Vector4 source, float opacity)
+ {
+ source.W *= opacity;
+
+ return Over(source, backdrop, Screen(source, backdrop));
}
///
@@ -1700,11 +2408,11 @@ internal static partial class PorterDuffFunctions
/// The backdrop vector.
/// The source vector.
/// The source opacity. Range 0..1
- /// The .
+ /// The .
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static Vector4 ScreenDestOver(Vector4 backdrop, Vector4 source, float opacity)
+ public static Vector256 ScreenDestOver(Vector256 backdrop, Vector256 source, Vector256 opacity)
{
- source.W *= opacity;
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
return Over(source, backdrop, Screen(source, backdrop));
}
@@ -1724,6 +2432,17 @@ internal static partial class PorterDuffFunctions
return In(source, backdrop);
}
+ ///
+ /// Returns the result of the "ScreenDestIn" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 ScreenDestIn(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => In(Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl), backdrop);
+
///
/// Returns the result of the "ScreenDestOut" compositing equation.
///
@@ -1739,6 +2458,17 @@ internal static partial class PorterDuffFunctions
return Out(source, backdrop);
}
+ ///
+ /// Returns the result of the "ScreenDestOut" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 ScreenDestOut(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Out(Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl), backdrop);
+
///
/// Returns the result of the "ScreenXor" compositing equation.
///
@@ -1754,6 +2484,17 @@ internal static partial class PorterDuffFunctions
return Xor(backdrop, source);
}
+ ///
+ /// Returns the result of the "ScreenXor" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 ScreenXor(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Xor(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "ScreenClear" compositing equation.
///
@@ -1769,6 +2510,17 @@ internal static partial class PorterDuffFunctions
return Clear(backdrop, source);
}
+ ///
+ /// Returns the result of the "ScreenClear" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 ScreenXor(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Clear(backdrop, Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl));
+
///
/// Returns the result of the "ScreenSrc" compositing equation.
@@ -2001,6 +2753,17 @@ internal static partial class PorterDuffFunctions
return source;
}
+ ///
+ /// Returns the result of the "DarkenSrc compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 DarkenSrc(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ => Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
///
/// Returns the result of the "DarkenSrcAtop" compositing equation.
///
@@ -2016,6 +2779,21 @@ internal static partial class PorterDuffFunctions
return Atop(backdrop, source, Darken(backdrop, source));
}
+ ///
+ /// Returns the result of the "DarkenSrcAtop" compositing equation.
+ ///
+ /// The backdrop vector.
+ /// The source vector.
+ /// The source opacity. Range 0..1
+ /// The .
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static Vector256 DarkenSrcAtop(Vector256 backdrop, Vector256 source, Vector256 opacity)
+ {
+ source = Avx.Blend(source, Avx.Multiply(source, opacity), BlendAlphaControl);
+
+ return Atop(backdrop, source, Darken(backdrop, source));
+ }
+
///