Update ResourceTextureManager API names

このコミットが含まれているのは:
Sergio Pedri committed 2022-08-15 15:01:16 +02:00
1 親 4d0549078b
コミット b1ce15feb8
4ファイル変更
+24 -24

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

+9 -9
ファイルの表示
@@ -20,7 +20,7 @@ namespace ComputeSharp.D2D1.Interop;
/// [uuid(3C4FC7E4-A419-46CA-B5F6-66EB4FF18D64)]
/// interface ID2D1ResourceTextureManager : IUnknown
/// {
/// HRESULT CreateResourceTexture(
/// HRESULT Initialize(
/// [in, optional] const GUID *resourceId,
/// [in] const D2D1_RESOURCE_TEXTURE_PROPERTIES *resourceTextureProperties,
/// [in, optional] const BYTE *data,
@@ -42,10 +42,10 @@ namespace ComputeSharp.D2D1.Interop;
/// </para>
/// <para>
/// This interface is implemented by ComputeSharp.D2D1, and it can be used through the APIs in <see cref="D2D1ResourceTextureManager"/>.
/// That is, <see cref="CreateResourceTextureManager"/> is first use to create an <c>ID2D1ResourceTextureManager</c> instance. Then,
/// <see cref="CreateResourceTexture"/> can be used to initialize the resource texture held by the manager. The manager can also be
/// assigned to an effect at any time, using the available property indices from <see cref="D2D1PixelShaderEffectProperty"/>. The
/// <see cref="UpdateResourceTexture"/> API can also be used to update texture data after the initial creation.
/// That is, <see cref="Create"/> is first use to create an <c>ID2D1ResourceTextureManager</c> instance. Then,
/// <see cref="Initialize"/> can be used to initialize the resource texture held by the manager. The manager can also be
/// assigned to an effect at any time, using the available property indices from <see cref="D2D1PixelShaderEffectProperty"/>.
/// The <see cref="Update"/> API can also be used to update texture data after the initial creation.
/// </para>
/// <para>
/// The <c>ID2D1ResourceTextureManager</c> contract allows callers to create a resource texture at any time even before the effect
@@ -59,7 +59,7 @@ namespace ComputeSharp.D2D1.Interop;
/// [uuid(5CBB1024-8EA1-4689-81BF-8AD190B5EF5D)]
/// interface ID2D1ResourceTextureManager : IUnknown
/// {
/// HRESULT Initialize([in] ID2D1EffectContext *effectContext);
/// HRESULT SetEffectContext([in] ID2D1EffectContext *effectContext);
///
/// HRESULT GetResourceTexture([out] ID2D1ResourceTexture **resourceTexture);
/// };
@@ -73,7 +73,7 @@ public static unsafe class D2D1ResourceTextureManager
/// Creates a new <c>ID2D1ResourceTextureManager</c> instance.
/// </summary>
/// <param name="resourceTextureManager">A pointer to the resulting <c>ID2D1ResourceTextureManager</c> instance.</param>
public static void CreateResourceTextureManager(void** resourceTextureManager)
public static void Create(void** resourceTextureManager)
{
// TODO: validate argument and return
@@ -92,7 +92,7 @@ public static unsafe class D2D1ResourceTextureManager
/// <param name="extendModes"></param>
/// <param name="data"></param>
/// <param name="strides"></param>
public static void CreateResourceTexture(
public static void Initialize(
void* resourceTextureManager,
Guid resourceId,
ReadOnlySpan<uint> extents,
@@ -137,7 +137,7 @@ public static unsafe class D2D1ResourceTextureManager
/// <param name="strides"></param>
/// <param name="dimensions"></param>
/// <param name="data"></param>
public static void UpdateResourceTexture(
public static void Update(
void* resourceTextureManager,
ReadOnlySpan<uint> minimumExtents,
ReadOnlySpan<uint> maximumExtents,
@@ -17,9 +17,9 @@ partial struct ResourceTextureManager
private static unsafe class ID2D1ResourceTextureManagerMethods
{
#if !NET6_0_OR_GREATER
/// <inheritdoc cref="CreateResourceTexture"/>
/// <inheritdoc cref="Initialize"/>
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate int CreateResourceTextureDelegate(
public delegate int InitializeDelegate(
ResourceTextureManager* @this,
Guid* resourceId,
D2D1_RESOURCE_TEXTURE_PROPERTIES* resourceTextureProperties,
@@ -54,9 +54,9 @@ partial struct ResourceTextureManager
public static readonly ReleaseDelegate ReleaseWrapper = Release;
/// <summary>
/// A cached <see cref="CreateResourceTextureDelegate"/> instance wrapping <see cref="CreateResourceTexture"/>.
/// A cached <see cref="InitializeDelegate"/> instance wrapping <see cref="Initialize"/>.
/// </summary>
public static readonly CreateResourceTextureDelegate CreateResourceTextureWrapper = CreateResourceTexture;
public static readonly InitializeDelegate InitializeWrapper = Initialize;
/// <summary>
/// A cached <see cref="UpdateDelegate"/> instance wrapping <see cref="Update"/>.
@@ -97,7 +97,7 @@ partial struct ResourceTextureManager
/// <param name="dataSize">The size, in bytes, of the data.</param>
/// <returns>An <see cref="HRESULT"/> for the operation.</returns>
[UnmanagedCallersOnly]
public static int CreateResourceTexture(
public static int Initialize(
ResourceTextureManager* @this,
Guid* resourceId,
D2D1_RESOURCE_TEXTURE_PROPERTIES* resourceTextureProperties,
@@ -17,9 +17,9 @@ partial struct ResourceTextureManager
private unsafe static class ID2D1ResourceTextureManagerInternalMethods
{
#if !NET6_0_OR_GREATER
/// <inheritdoc cref="Initialize"/>
/// <inheritdoc cref="SetEffectContext"/>
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate int InitializeDelegate(ResourceTextureManager* @this, ID2D1EffectContext* effectContext);
public delegate int SetEffectContextDelegate(ResourceTextureManager* @this, ID2D1EffectContext* effectContext);
/// <inheritdoc cref="GetResourceTexture"/>
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
@@ -41,9 +41,9 @@ partial struct ResourceTextureManager
public static readonly ReleaseDelegate ReleaseWrapper = Release;
/// <summary>
/// A cached <see cref="InitializeDelegate"/> instance wrapping <see cref="Initialize"/>.
/// A cached <see cref="SetEffectContextDelegate"/> instance wrapping <see cref="SetEffectContext"/>.
/// </summary>
public static readonly InitializeDelegate InitializeWrapper = Initialize;
public static readonly SetEffectContextDelegate SetEffectContextWrapper = SetEffectContext;
/// <summary>
/// A cached <see cref="GetResourceTextureDelegate"/> instance wrapping <see cref="GetResourceTexture"/>.
@@ -79,13 +79,13 @@ partial struct ResourceTextureManager
}
/// <summary>
/// Initializes the current <c>ID2D1ResourceTextureManagerInternal</c> instance.
/// Sets the <see cref="ID2D1EffectContext"/> for the current <c>ID2D1ResourceTextureManagerInternal</c> instance.
/// </summary>
/// <param name="this">The current <c>ID2D1ResourceTextureManagerInternal</c> instance.</param>
/// <param name="effectContext">The input <see cref="ID2D1EffectContext"/> for the manager.</param>
/// <returns>An <see cref="HRESULT"/> for the operation.</returns>
[UnmanagedCallersOnly]
public static int Initialize(ResourceTextureManager* @this, ID2D1EffectContext* effectContext)
public static int SetEffectContext(ResourceTextureManager* @this, ID2D1EffectContext* effectContext)
{
@this = (ResourceTextureManager*)&((void**)@this)[-1];
@@ -98,13 +98,13 @@ internal unsafe partial struct ResourceTextureManager
lpVtbl[0] = (delegate* unmanaged<ResourceTextureManager*, Guid*, void**, int>)&ID2D1ResourceTextureManagerMethods.QueryInterface;
lpVtbl[1] = (delegate* unmanaged<ResourceTextureManager*, uint>)&ID2D1ResourceTextureManagerMethods.AddRef;
lpVtbl[2] = (delegate* unmanaged<ResourceTextureManager*, uint>)&ID2D1ResourceTextureManagerMethods.Release;
lpVtbl[3] = (delegate* unmanaged<ResourceTextureManager*, Guid*, D2D1_RESOURCE_TEXTURE_PROPERTIES*, byte*, uint*, uint, int>)&ID2D1ResourceTextureManagerMethods.CreateResourceTexture;
lpVtbl[3] = (delegate* unmanaged<ResourceTextureManager*, Guid*, D2D1_RESOURCE_TEXTURE_PROPERTIES*, byte*, uint*, uint, int>)&ID2D1ResourceTextureManagerMethods.Initialize;
lpVtbl[4] = (delegate* unmanaged<ResourceTextureManager*, uint*, uint*, uint*, uint, byte*, uint, int>)&ID2D1ResourceTextureManagerMethods.Update;
#else
lpVtbl[0] = (void*)Marshal.GetFunctionPointerForDelegate(ID2D1ResourceTextureManagerMethods.QueryInterfaceWrapper);
lpVtbl[1] = (void*)Marshal.GetFunctionPointerForDelegate(ID2D1ResourceTextureManagerMethods.AddRefWrapper);
lpVtbl[2] = (void*)Marshal.GetFunctionPointerForDelegate(ID2D1ResourceTextureManagerMethods.ReleaseWrapper);
lpVtbl[3] = (void*)Marshal.GetFunctionPointerForDelegate(ID2D1ResourceTextureManagerMethods.CreateResourceTextureWrapper);
lpVtbl[3] = (void*)Marshal.GetFunctionPointerForDelegate(ID2D1ResourceTextureManagerMethods.InitializeWrapper);
lpVtbl[4] = (void*)Marshal.GetFunctionPointerForDelegate(ID2D1ResourceTextureManagerMethods.UpdateWrapper);
#endif
@@ -113,13 +113,13 @@ internal unsafe partial struct ResourceTextureManager
lpVtbl[5 + 0] = (delegate* unmanaged<ResourceTextureManager*, Guid*, void**, int>)&ID2D1ResourceTextureManagerInternalMethods.QueryInterface;
lpVtbl[5 + 1] = (delegate* unmanaged<ResourceTextureManager*, uint>)&ID2D1ResourceTextureManagerInternalMethods.AddRef;
lpVtbl[5 + 2] = (delegate* unmanaged<ResourceTextureManager*, uint>)&ID2D1ResourceTextureManagerInternalMethods.Release;
lpVtbl[5 + 3] = (delegate* unmanaged<ResourceTextureManager*, ID2D1EffectContext*, int>)&ID2D1ResourceTextureManagerInternalMethods.Initialize;
lpVtbl[5 + 3] = (delegate* unmanaged<ResourceTextureManager*, ID2D1EffectContext*, int>)&ID2D1ResourceTextureManagerInternalMethods.SetEffectContext;
lpVtbl[5 + 4] = (delegate* unmanaged<ResourceTextureManager*, ID2D1ResourceTexture**, int>)&ID2D1ResourceTextureManagerInternalMethods.GetResourceTexture;
#else
lpVtbl[5 + 0] = (void*)Marshal.GetFunctionPointerForDelegate(ID2D1ResourceTextureManagerInternalMethods.QueryInterfaceWrapper);
lpVtbl[5 + 1] = (void*)Marshal.GetFunctionPointerForDelegate(ID2D1ResourceTextureManagerInternalMethods.AddRefWrapper);
lpVtbl[5 + 2] = (void*)Marshal.GetFunctionPointerForDelegate(ID2D1ResourceTextureManagerInternalMethods.ReleaseWrapper);
lpVtbl[5 + 3] = (void*)Marshal.GetFunctionPointerForDelegate(ID2D1ResourceTextureManagerInternalMethods.InitializeWrapper);
lpVtbl[5 + 3] = (void*)Marshal.GetFunctionPointerForDelegate(ID2D1ResourceTextureManagerInternalMethods.SetEffectContextWrapper);
lpVtbl[5 + 4] = (void*)Marshal.GetFunctionPointerForDelegate(ID2D1ResourceTextureManagerInternalMethods.GetResourceTextureWrapper);
#endif