Remove LoadResourceTextureDescriptions<TLoader> API

このコミットが含まれているのは:
Sergio Pedri committed 2023-09-27 22:49:30 +02:00
1 親 b17b7c70fe
コミット 76ae699797
8ファイル変更
+13 -82

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

@@ -1,18 +0,0 @@
using System;
using System.ComponentModel;
namespace ComputeSharp.D2D1.__Internals;
/// <summary>
/// A base <see langword="interface"/> representing a loader for resource texture descriptions in a D2D1 shader.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("This interface is not intended to be used directly by user code")]
public interface ID2D1ResourceTextureDescriptionsLoader
{
/// <summary>
/// Loads the available resource texture descriptions for the shader.
/// </summary>
/// <param name="data">The sequence of serialized resource texture descriptions.</param>
void LoadResourceTextureDescriptions(ReadOnlySpan<byte> data);
}
-10
ファイルの表示
@@ -98,16 +98,6 @@ public interface ID2D1Shader
[Obsolete("This method is not intended to be used directly by user code")]
ReadOnlyMemory<D2D1ResourceTextureDescription> ResourceTextureDescriptions { get; }
/// <summary>
/// Loads the resource texture descriptions for the shader, if any.
/// </summary>
/// <typeparam name="TLoader">The type of resource texture descriptions loader being used.</typeparam>
/// <param name="loader">The <typeparamref name="TLoader"/> instance to use to load the resource texture descriptions.</param>
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("This method is not intended to be used directly by user code")]
void LoadResourceTextureDescriptions<TLoader>(ref TLoader loader)
where TLoader : struct, ID2D1ResourceTextureDescriptionsLoader;
/// <summary>
/// Gets the output buffer precision and depth for the shader.
/// </summary>
+1 -5
ファイルの表示
@@ -292,13 +292,9 @@ public static class D2D1PixelShader
public static ReadOnlyMemory<D2D1ResourceTextureDescription> GetResourceTextureDescriptions<T>()
where T : unmanaged, ID2D1PixelShader
{
D2D1ByteArrayResourceTextureDescriptionsLoader resourceTextureDescriptionsLoader = default;
Unsafe.SkipInit(out T shader);
shader.LoadResourceTextureDescriptions(ref resourceTextureDescriptionsLoader);
return resourceTextureDescriptionsLoader.GetResultingResourceTextureDescriptions();
return shader.ResourceTextureDescriptions;
}
/// <summary>
@@ -1,36 +0,0 @@
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;
/// <summary>
/// A resource texture descriptions loader for D2D1 pixel shaders.
/// </summary>
internal struct D2D1ByteArrayResourceTextureDescriptionsLoader : ID2D1ResourceTextureDescriptionsLoader
{
/// <summary>
/// The resulting <see cref="D2D1ResourceTextureDescription"/> array.
/// </summary>
private D2D1ResourceTextureDescription[]? resourceTextureDescriptions;
/// <summary>
/// Gets the resulting resource texture descriptions.
/// </summary>
/// <returns>A <see cref="D2D1ResourceTextureDescription"/> array with the available resource texture descriptions.</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public readonly D2D1ResourceTextureDescription[] GetResultingResourceTextureDescriptions()
{
return this.resourceTextureDescriptions!;
}
/// <inheritdoc/>
void ID2D1ResourceTextureDescriptionsLoader.LoadResourceTextureDescriptions(ReadOnlySpan<byte> data)
{
this.resourceTextureDescriptions = MemoryMarshal.Cast<byte, D2D1ResourceTextureDescription>(data).ToArray();
}
}