Add D2D1 pixel option types and APIs

このコミットが含まれているのは:
Sergio Pedri committed 2022-05-08 21:50:17 +02:00
1 親 6a83c6827d
コミット 6fbdef8ce4
5ファイル変更
+72

検索条件に一致するファイルはありません

+13
ファイルの表示
@@ -80,6 +80,19 @@ public static class D2D1PixelShader
return new ReadOnlySpan<byte>(bytecodePtr, bytecodeSize).ToArray();
}
/// <summary>
/// Gets the pixel options from an input D2D1 pixel shader.
/// </summary>
/// <typeparam name="T">The type of D2D1 pixel shader to get the pixel options for.</typeparam>
/// <returns>The pixel options for the D2D1 pixel shader of type <typeparamref name="T"/>.</returns>
public static D2D1PixelOption GetPixelOptions<T>()
where T : unmanaged, ID2D1PixelShader
{
Unsafe.SkipInit(out T shader);
return (D2D1PixelOption)shader.GetPixelOptions();
}
/// <summary>
/// Gets the number of inputs from an input D2D1 pixel shader.
/// </summary>