Rename D2D1 generator file names and generated name

このコミットが含まれているのは:
Sergio Pedri committed 2023-10-02 03:22:02 +02:00
1 親 80221ce0cd
コミット ec77fb7e6f
26ファイル変更
+62 -86

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

@@ -0,0 +1,31 @@
using ComputeSharp.SourceGeneration.Extensions;
using Microsoft.CodeAnalysis;
namespace ComputeSharp.D2D1.SourceGenerators;
/// <inheritdoc/>
partial class D2DPixelShaderDescriptorGenerator
{
/// <summary>
/// A helper with all logic to generate the <c>PixelOptions</c> property.
/// </summary>
private static partial class PixelOptions
{
/// <summary>
/// Extracts the pixel options for the current shader.
/// </summary>
/// <param name="structDeclarationSymbol">The input <see cref="INamedTypeSymbol"/> instance to process.</param>
/// <param name="pixelOptions">The pixel options for the shader.</param>
public static void GetInfo(INamedTypeSymbol structDeclarationSymbol, out D2D1PixelOptions pixelOptions)
{
if (structDeclarationSymbol.TryGetAttributeWithFullyQualifiedMetadataName("ComputeSharp.D2D1.D2DPixelOptionsAttribute", out AttributeData? attributeData))
{
pixelOptions = (D2D1PixelOptions)attributeData.ConstructorArguments[0].Value!;
}
else
{
pixelOptions = D2D1PixelOptions.None;
}
}
}
}