using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using ComputeSharp.D2D1.__Internals; using ComputeSharp.D2D1.Interop; #pragma warning disable CS0618 namespace ComputeSharp.D2D1.Shaders.Loaders; /// /// An input descriptions loader for D2D1 pixel shaders. /// internal struct D2D1ByteArrayInputDescriptionsLoader : ID2D1InputDescriptionsLoader { /// /// The resulting array. /// private D2D1InputDescription[]? inputDescriptions; /// /// Gets the resulting input descriptions. /// /// A array with the available input descriptions. [MethodImpl(MethodImplOptions.AggressiveInlining)] public readonly D2D1InputDescription[] GetResultingInputDescriptions() { return this.inputDescriptions!; } /// void ID2D1InputDescriptionsLoader.LoadInputDescriptions(ReadOnlySpan data) { this.inputDescriptions = MemoryMarshal.Cast(data).ToArray(); } }