Rename mapper type to D2D1DrawTransformMapper<T>
このコミットが含まれているのは:
1 親
726bac4818
コミット
755c82d7bd
27ファイル変更
+230
-230
検索条件に一致するファイルはありません
@@ -95,7 +95,7 @@ public partial class D2D1PixelShaderEffectTests
|
||||
[ExpectedException(typeof(ArgumentNullException), AllowDerivedTypes = false)]
|
||||
public unsafe void SetTransformMapperForD2D1Effect_RCW_NullD2D1ResourceTextureManager()
|
||||
{
|
||||
D2D1PixelShaderEffect.SetTransformMapperForD2D1Effect((void*)1, (D2D1TransformMapper<NullConstantBufferShader>)null!);
|
||||
D2D1PixelShaderEffect.SetTransformMapperForD2D1Effect((void*)1, (D2D1DrawTransformMapper<NullConstantBufferShader>)null!);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
|
||||
@@ -20,7 +20,7 @@ public partial class D2D1TransformMapperTests
|
||||
[TestMethod]
|
||||
public unsafe void VerifyInterfaces()
|
||||
{
|
||||
D2D1TransformMapper<HelloWorld> transformMapper = D2D1TransformMapper<HelloWorld>.Inflate(4);
|
||||
D2D1DrawTransformMapper<HelloWorld> transformMapper = D2D1DrawTransformMapper<HelloWorld>.Inflate(4);
|
||||
|
||||
using ComPtr<IUnknown> unknown = default;
|
||||
using ComPtr<IUnknown> transformMapper2 = default;
|
||||
@@ -58,7 +58,7 @@ public partial class D2D1TransformMapperTests
|
||||
|
||||
D2D1PixelShaderEffect.RegisterForD2D1Factory1<DummyShader>(d2D1Factory2.Get(), out _);
|
||||
|
||||
D2D1TransformMapper<HelloWorld> transformMapper = D2D1TransformMapper<HelloWorld>.Inflate(4);
|
||||
D2D1DrawTransformMapper<HelloWorld> transformMapper = D2D1DrawTransformMapper<HelloWorld>.Inflate(4);
|
||||
|
||||
using ComPtr<IUnknown> transformMapper2 = default;
|
||||
|
||||
@@ -99,7 +99,7 @@ public partial class D2D1TransformMapperTests
|
||||
[TestMethod]
|
||||
public unsafe void VerifyManagedWrapperRetrieval()
|
||||
{
|
||||
D2D1TransformMapper<HelloWorld> transformMapper = D2D1TransformMapper<HelloWorld>.Inflate(4);
|
||||
D2D1DrawTransformMapper<HelloWorld> transformMapper = D2D1DrawTransformMapper<HelloWorld>.Inflate(4);
|
||||
|
||||
using ComPtr<IUnknown> unknown = default;
|
||||
using ComPtr<IUnknown> transformMapperInternal = default;
|
||||
@@ -139,7 +139,7 @@ public partial class D2D1TransformMapperTests
|
||||
IUnknown** transformMapperUnknown,
|
||||
out GCHandle transformMapperHandle)
|
||||
{
|
||||
D2D1TransformMapper<HelloWorld> transformMapper = D2D1TransformMapper<HelloWorld>.Inflate(4);
|
||||
D2D1DrawTransformMapper<HelloWorld> transformMapper = D2D1DrawTransformMapper<HelloWorld>.Inflate(4);
|
||||
|
||||
Guid uuidOfTransformMapper = new("02E6D48D-B892-4FBC-AA54-119203BAB802");
|
||||
|
||||
@@ -243,7 +243,7 @@ public partial class D2D1TransformMapperTests
|
||||
TolerantImageComparer.AssertEqual(destinationPath, expectedPath, 0.00001f);
|
||||
}
|
||||
|
||||
private sealed class DispatchAreaTransformMapper : D2D1TransformMapper<ShaderWithDispatchArea>
|
||||
private sealed class DispatchAreaTransformMapper : D2D1DrawTransformMapper<ShaderWithDispatchArea>
|
||||
{
|
||||
public int ExpectedWidth;
|
||||
public int ExpectedHeight;
|
||||
|
||||
@@ -479,9 +479,9 @@ public sealed partial class BokehBlurEffect
|
||||
internal sealed partial class VerticalConvolution
|
||||
{
|
||||
/// <summary>
|
||||
/// The <see cref="D2D1TransformMapper{T}"/> for the shader.
|
||||
/// The <see cref="D2D1DrawTransformMapper{T}"/> for the shader.
|
||||
/// </summary>
|
||||
public static D2D1TransformMapper<Shader> Transform { get; } = D2D1TransformMapper<Shader>.Inflate(static (in Shader shader) => (0, shader.kernelLength, 0, shader.kernelLength));
|
||||
public static D2D1DrawTransformMapper<Shader> Transform { get; } = D2D1DrawTransformMapper<Shader>.Inflate(static (in Shader shader) => (0, shader.kernelLength, 0, shader.kernelLength));
|
||||
|
||||
/// <summary>
|
||||
/// Kernel for the vertical convolution pass for real or imaginary components.
|
||||
@@ -526,9 +526,9 @@ public sealed partial class BokehBlurEffect
|
||||
internal sealed partial class HorizontalConvolutionAndAccumulatePartials
|
||||
{
|
||||
/// <summary>
|
||||
/// The <see cref="D2D1TransformMapper{T}"/> for the shader.
|
||||
/// The <see cref="D2D1DrawTransformMapper{T}"/> for the shader.
|
||||
/// </summary>
|
||||
public static D2D1TransformMapper<Shader> Transform { get; } = D2D1TransformMapper<Shader>.Inflate(static (in Shader shader) => (shader.kernelLength, 0, shader.kernelLength, 0));
|
||||
public static D2D1DrawTransformMapper<Shader> Transform { get; } = D2D1DrawTransformMapper<Shader>.Inflate(static (in Shader shader) => (shader.kernelLength, 0, shader.kernelLength, 0));
|
||||
|
||||
/// <summary>
|
||||
/// Kernel for the horizontal convolution pass.
|
||||
|
||||
@@ -49,7 +49,7 @@ public class EffectsTests
|
||||
{
|
||||
D2D1TestRunner.RunAndCompareShader(
|
||||
new PixelateEffect(new PixelateEffect.Constants(1280, 840, 16)),
|
||||
D2D1TransformMapper<PixelateEffect>.Inflate(16),
|
||||
D2D1DrawTransformMapper<PixelateEffect>.Inflate(16),
|
||||
"Landscape.png",
|
||||
"Landscape_Pixelate.png");
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ internal static class D2D1TestRunner
|
||||
/// Executes a pixel shader and compares the expected results.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of pixel shader to run.</typeparam>
|
||||
/// <param name="transformMapper">A custom <see cref="D2D1TransformMapper{T}"/> instance for the effect.</param>
|
||||
/// <param name="transformMapper">A custom <see cref="D2D1DrawTransformMapper{T}"/> instance for the effect.</param>
|
||||
/// <param name="originalFileName">The name of the source image.</param>
|
||||
/// <param name="expectedFileName">The name of the expected result image.</param>
|
||||
/// <param name="destinationFileName">The name of the destination image to save results to.</param>
|
||||
@@ -27,7 +27,7 @@ internal static class D2D1TestRunner
|
||||
/// <param name="threshold">The allowed difference threshold for the normalized delta.</param>
|
||||
public static void RunAndCompareShader<T>(
|
||||
in T shader,
|
||||
D2D1TransformMapper<T>? transformMapper,
|
||||
D2D1DrawTransformMapper<T>? transformMapper,
|
||||
string originalFileName,
|
||||
string expectedFileName,
|
||||
[CallerMemberName] string destinationFileName = "",
|
||||
@@ -101,12 +101,12 @@ internal static class D2D1TestRunner
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The shader type to execute.</typeparam>
|
||||
/// <param name="shader">The shader to run.</param>
|
||||
/// <param name="transformMapper">A custom <see cref="D2D1TransformMapper{T}"/> instance for the effect.</param>
|
||||
/// <param name="transformMapper">A custom <see cref="D2D1DrawTransformMapper{T}"/> instance for the effect.</param>
|
||||
/// <param name="sourcePath">The source path for the image to run the shader on.</param>
|
||||
/// <param name="destinationPath">The destination path for the result.</param>
|
||||
private static unsafe void ExecutePixelShaderAndSaveToFile<T>(
|
||||
in T shader,
|
||||
D2D1TransformMapper<T>? transformMapper,
|
||||
D2D1DrawTransformMapper<T>? transformMapper,
|
||||
string sourcePath,
|
||||
string destinationPath)
|
||||
where T : unmanaged, ID2D1PixelShader, ID2D1PixelShaderDescriptor<T>
|
||||
@@ -148,12 +148,12 @@ internal static class D2D1TestRunner
|
||||
/// <param name="shader">The shader to run.</param>
|
||||
/// <param name="width">The resulting width.</param>
|
||||
/// <param name="height">The resulting height.</param>
|
||||
/// <param name="transformMapper">A custom <see cref="D2D1TransformMapper{T}"/> instance for the effect.</param>
|
||||
/// <param name="transformMapper">A custom <see cref="D2D1DrawTransformMapper{T}"/> instance for the effect.</param>
|
||||
/// <param name="destinationPath">The destination path for the result.</param>
|
||||
/// <param name="resourceTextures">The additional resource textures to use to run the shader.</param>
|
||||
private static unsafe void ExecutePixelShaderAndSaveToFile<T>(
|
||||
in T shader,
|
||||
D2D1TransformMapper<T>? transformMapper,
|
||||
D2D1DrawTransformMapper<T>? transformMapper,
|
||||
int width,
|
||||
int height,
|
||||
string destinationPath,
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする