Make exposed CCW types partial (eg. EffectFactory)

このコミットが含まれているのは:
Sergio Pedri committed 2024-06-28 15:36:25 -07:00
1 親 ed088c844d
コミット 9e4a416a18
2ファイル変更
+8 -4

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

+2 -2
ファイルの表示
@@ -8,7 +8,7 @@ namespace ComputeSharp.SwapChain.D2D1.Backend;
/// <summary>
/// An base effect for an animated pixel shader.
/// </summary>
internal abstract class PixelShaderEffect : CanvasEffect
internal abstract partial class PixelShaderEffect : CanvasEffect
{
/// <summary>
/// The current elapsed time.
@@ -57,7 +57,7 @@ internal abstract class PixelShaderEffect : CanvasEffect
/// </summary>
/// <typeparam name="T">The type of pixel shader to render.</typeparam>
/// <param name="factory">The input <typeparamref name="T"/> factory.</param>
public sealed class For<T>(For<T>.Factory factory) : PixelShaderEffect
public sealed partial class For<T>(For<T>.Factory factory) : PixelShaderEffect
where T : unmanaged, ID2D1PixelShader, ID2D1PixelShaderDescriptor<T>
{
/// <summary>
+6 -2
ファイルの表示
@@ -10,7 +10,7 @@ using ICanvasEffectFactoryNative = Microsoft.Graphics.Canvas.ICanvasEffectFactor
namespace ComputeSharp.D2D1.WinUI;
/// <inheritdoc/>
unsafe partial class PixelShaderEffect<T>
partial class PixelShaderEffect<T>
{
/// <summary>
/// A manager type to handle the effect factory registration logic for <see cref="ICanvasEffectFactoryNative"/>.
@@ -75,7 +75,11 @@ unsafe partial class PixelShaderEffect<T>
/// <summary>
/// A managed implementation of <see cref="ICanvasEffectFactoryNative"/> for <see cref="PixelShaderEffect{T}"/>.
/// </summary>
private sealed class EffectFactory : ICanvasEffectFactoryNative
/// <remarks>
/// This type is partial even though there are no other explicit partial type declarations in the project, so the CsWinRT
/// generator can generate one using <see cref="WinRT.WinRTExposedTypeAttribute"/> and the precomputed vtable entries.
/// </remarks>
internal sealed unsafe partial class EffectFactory : ICanvasEffectFactoryNative
{
/// <inheritdoc/>
int ICanvasEffectFactoryNative.CreateWrapper(ICanvasDevice* device, ID2D1Effect* resource, float dpi, IInspectable** wrapper)