diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Factories/Abstract/D2D1TransformMapperFactory{T, TSelf, TParameters, TTransformMapper}.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Factories/Abstract/D2D1TransformMapperFactory{T, TParameters, TTransformMapper}.cs similarity index 54% rename from src/ComputeSharp.D2D1/Shaders/Interop/Factories/Abstract/D2D1TransformMapperFactory{T, TSelf, TParameters, TTransformMapper}.cs rename to src/ComputeSharp.D2D1/Shaders/Interop/Factories/Abstract/D2D1TransformMapperFactory{T, TParameters, TTransformMapper}.cs index a6892448..5c70ae11 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Factories/Abstract/D2D1TransformMapperFactory{T, TSelf, TParameters, TTransformMapper}.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Factories/Abstract/D2D1TransformMapperFactory{T, TParameters, TTransformMapper}.cs @@ -4,25 +4,13 @@ /// A base type for a transform mapper factory to be used in a D2D1 pixel shader effect. /// /// The type of D2D1 pixel shader associated to the transform mapper. -/// The type of concrete transform mapper factory inheriting from this base type. /// The type of parameters that the transform mapper will use. /// The type of concrete transform mapper to produce from this factory. -internal abstract class D2D1TransformMapperFactory : ID2D1TransformMapperFactory +internal abstract class D2D1TransformMapperFactory : ID2D1TransformMapperFactory where T : unmanaged, ID2D1PixelShader - where TSelf : D2D1TransformMapperFactory, new() where TParameters : unmanaged where TTransformMapper : D2D1TransformMapper, new() { - /// - /// Creates a new instance with the specified accessor. - /// - /// The input instance to be used to retrieve parameters. - /// The new instance with the specified accessor. - public ID2D1TransformMapperFactory Create(D2D1TransformMapperParametersAccessor accessor) - { - return new TSelf { Parameters = accessor }; - } - /// ID2D1TransformMapper ID2D1TransformMapperFactory.Create() { diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Factories/Abstract/D2D1TransformMapper{T, TParameters}.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Factories/Abstract/D2D1TransformMapper{T, TParameters}.cs index 8ae08b70..9b29572d 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Factories/Abstract/D2D1TransformMapper{T, TParameters}.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Factories/Abstract/D2D1TransformMapper{T, TParameters}.cs @@ -19,7 +19,7 @@ internal abstract class D2D1TransformMapper : ID2D1TransformMapp /// private TParameters parameters; - /// + /// public D2D1TransformMapperParametersAccessor? Parameters { get; init; } /// diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Factories/D2D1AffineTransformMapperFactory.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Factories/D2D1AffineTransformMapperFactory.cs index 9aa24eba..5ea6d252 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Factories/D2D1AffineTransformMapperFactory.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Factories/D2D1AffineTransformMapperFactory.cs @@ -7,10 +7,10 @@ using ComputeSharp.D2D1.Shaders.Interop.Helpers; namespace ComputeSharp.D2D1.Shaders.Interop.Factories; /// -/// A custom implementation for an affine transform. +/// A custom implementation for an affine transform. /// /// The type of D2D1 pixel shader associated to the transform mapper. -internal sealed class D2D1AffineTransformMapperFactory : D2D1TransformMapperFactory, Matrix3x2, D2D1AffineTransformMapperFactory.TransformMapper> +internal sealed class D2D1AffineTransformMapperFactory : D2D1TransformMapperFactory.TransformMapper> where T : unmanaged, ID2D1PixelShader { /// diff --git a/src/ComputeSharp.D2D1/Shaders/Interop/Factories/D2D1InflateTransformMapperFactory.cs b/src/ComputeSharp.D2D1/Shaders/Interop/Factories/D2D1InflateTransformMapperFactory.cs index fed164e6..a9fdc4dc 100644 --- a/src/ComputeSharp.D2D1/Shaders/Interop/Factories/D2D1InflateTransformMapperFactory.cs +++ b/src/ComputeSharp.D2D1/Shaders/Interop/Factories/D2D1InflateTransformMapperFactory.cs @@ -5,10 +5,10 @@ using ComputeSharp.D2D1.Shaders.Interop.Helpers; namespace ComputeSharp.D2D1.Shaders.Interop.Factories; /// -/// A custom implementation for an inflate transform. +/// A custom implementation for an inflate transform. /// /// The type of D2D1 pixel shader associated to the transform mapper. -internal sealed class D2D1InflateTransformMapperFactory : D2D1TransformMapperFactory, (int, int, int, int), D2D1InflateTransformMapperFactory.TransformMapper> +internal sealed class D2D1InflateTransformMapperFactory : D2D1TransformMapperFactory.TransformMapper> where T : unmanaged, ID2D1PixelShader { ///