Update Win2D method signatures in all projects

このコミットが含まれているのは:
Sergio Pedri committed 2023-09-30 18:38:36 +02:00
1 親 76df248427
コミット 0fb876fde0
8ファイル変更
+22 -17

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

+5 -4
ファイルの表示
@@ -2,6 +2,7 @@ using System;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using ComputeSharp.D2D1.Descriptors;
using ComputeSharp.D2D1.Interop;
using ComputeSharp.Tests.Helpers;
using Win32;
@@ -32,7 +33,7 @@ internal static class D2D1TestRunner
string expectedFileName,
[CallerMemberName] string destinationFileName = "",
float threshold = 0.00001f)
where T : unmanaged, ID2D1PixelShader
where T : unmanaged, ID2D1PixelShader, ID2D1PixelShaderDescriptor<T>
{
string assetsPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "Assets");
string temporaryPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "temp");
@@ -73,7 +74,7 @@ internal static class D2D1TestRunner
[CallerMemberName] string destinationFileName = "",
float threshold = 0.00001f,
params (int Index, D2D1ResourceTextureManager ResourceTextureManager)[] resourceTextures)
where T : unmanaged, ID2D1PixelShader
where T : unmanaged, ID2D1PixelShader, ID2D1PixelShaderDescriptor<T>
{
string assetsPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "Assets");
string temporaryPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, "temp");
@@ -109,7 +110,7 @@ internal static class D2D1TestRunner
D2D1TransformMapper<T>? transformMapper,
string sourcePath,
string destinationPath)
where T : unmanaged, ID2D1PixelShader
where T : unmanaged, ID2D1PixelShader, ID2D1PixelShaderDescriptor<T>
{
using ComPtr<ID2D1Factory2> d2D1Factory2 = D2D1Helper.CreateD2D1Factory2();
using ComPtr<ID2D1Device> d2D1Device = D2D1Helper.CreateD2D1Device(d2D1Factory2.Get());
@@ -158,7 +159,7 @@ internal static class D2D1TestRunner
int height,
string destinationPath,
params (int Index, D2D1ResourceTextureManager ResourceTextureManager)[] resourceTextures)
where T : unmanaged, ID2D1PixelShader
where T : unmanaged, ID2D1PixelShader, ID2D1PixelShaderDescriptor<T>
{
using ComPtr<ID2D1Factory2> d2D1Factory2 = D2D1Helper.CreateD2D1Factory2();
using ComPtr<ID2D1Device> d2D1Device = D2D1Helper.CreateD2D1Device(d2D1Factory2.Get());
+2 -1
ファイルの表示
@@ -2,6 +2,7 @@ using System;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using ComputeSharp.D2D1.Descriptors;
using ComputeSharp.D2D1.Interop;
using ComputeSharp.D2D1.Tests.Helpers;
using ComputeSharp.SwapChain.Shaders.D2D1;
@@ -114,7 +115,7 @@ public class ShadersTests
}
private static void RunTest<T>(float threshold = 0.00001f)
where T : unmanaged, ID2D1PixelShader
where T : unmanaged, ID2D1PixelShader, ID2D1PixelShaderDescriptor<T>
{
T shader = (T)Activator.CreateInstance(typeof(T), 0f, new int2(1280, 720))!;
+3 -2
ファイルの表示
@@ -2,6 +2,7 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Threading.Tasks;
using ComputeSharp.D2D1.Descriptors;
using ComputeSharp.D2D1.UI.Tests.Helpers;
#if WINDOWS_UWP
using ComputeSharp.D2D1.Uwp;
@@ -79,7 +80,7 @@ public class ShadersTests
}
private static async Task RunTestAsync<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] T>(WrapperType wrapperType, float threshold = 0.00001f)
where T : unmanaged, ID2D1PixelShader
where T : unmanaged, ID2D1PixelShader, ID2D1PixelShaderDescriptor<T>
{
T shader = (T)Activator.CreateInstance(typeof(T), 0f, new int2(1280, 720))!;
@@ -118,7 +119,7 @@ public class ShadersTests
}
private sealed class TestCanvasEffect<T> : CanvasEffect
where T : unmanaged, ID2D1PixelShader
where T : unmanaged, ID2D1PixelShader, ID2D1PixelShaderDescriptor<T>
{
private static readonly EffectNode<PixelShaderEffect<T>> Effect = new();