Update namespaces in ComputeSharp.D2D1.WinUI

このコミットが含まれているのは:
Sergio Pedri committed 2023-10-18 12:08:17 +02:00
1 親 ff071ced69
コミット eccc297d8d
28ファイル変更
+49 -77

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

+1 -2
ファイルの表示
@@ -1,8 +1,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using TerraFX.Interop;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
#pragma warning disable CS0649, IDE1006
+1 -2
ファイルの表示
@@ -1,8 +1,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using TerraFX.Interop;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
#pragma warning disable CS0649, IDE1006
@@ -1,12 +1,10 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using TerraFX.Interop;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
using WinRT;
using WinRT.Interop;
using IInspectable = TerraFX.Interop.WinRT.IInspectable;
using IInspectable = ComputeSharp.Win32.IInspectable;
#pragma warning disable CS0649, IDE1006
+4 -5
ファイルの表示
@@ -1,11 +1,10 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using TerraFX.Interop;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
using WinRT;
using WinRT.Interop;
using IInspectable = TerraFX.Interop.WinRT.IInspectable;
using IInspectable = ComputeSharp.Win32.IInspectable;
#pragma warning disable CS0649, IDE1006
@@ -77,7 +76,7 @@ internal unsafe struct ICanvasFactoryNative
/// was not previously registered, or <see cref="S.S_FALSE"/> if <paramref name="resource"/> was already registered.
/// </returns>
/// <remarks>
/// The method validates at runtime that <paramref name="resource"/> is an <see cref="TerraFX.Interop.DirectX.ID2D1Image"/>
/// The method validates at runtime that <paramref name="resource"/> is an <see cref="ComputeSharp.Win32.ID2D1Image"/>
/// and that <paramref name="wrapper"/> is an <see cref="global::Microsoft.Graphics.Canvas.ICanvasImage"/>. Additionally,
/// <paramref name="wrapper"/> has to implement <c>IWeakReferenceSource</c> for this method to be successful.
/// </remarks>
@@ -100,7 +99,7 @@ internal unsafe struct ICanvasFactoryNative
/// resource was previously registered and could be correctly unregistered, <see cref="S.S_FALSE"/> otherwise.
/// </returns>
/// <remarks>
/// The method validates at runtime that <paramref name="resource"/> is an <see cref="TerraFX.Interop.DirectX.ID2D1Image"/>.
/// The method validates at runtime that <paramref name="resource"/> is an <see cref="ComputeSharp.Win32.ID2D1Image"/>.
/// </remarks>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[VtblIndex(8)]
+1 -3
ファイルの表示
@@ -1,9 +1,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
using TerraFX.Interop;
using ComputeSharp.Win32;
using WinRT;
using WinRT.Interop;
+1 -2
ファイルの表示
@@ -1,8 +1,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using TerraFX.Interop;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
#pragma warning disable CS0649, IDE1006
@@ -1,8 +1,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using TerraFX.Interop;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
#pragma warning disable CS0649, IDE1006
@@ -1,8 +1,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using TerraFX.Interop;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
#pragma warning disable CS0649, IDE1006
+1 -3
ファイルの表示
@@ -1,9 +1,7 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using TerraFX.Interop;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
#pragma warning disable CS0649, IDE1006
+2 -3
ファイルの表示
@@ -1,15 +1,14 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using TerraFX.Interop;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
#pragma warning disable CS0649, IDE1006
namespace ABI.Microsoft.Graphics.Canvas;
/// <summary>
/// An interface for an object that provides access to pooled <see cref="TerraFX.Interop.DirectX.ID2D1DeviceContext"/> objects.
/// An interface for an object that provides access to pooled <see cref="ID2D1DeviceContext"/> objects.
/// </summary>
[Guid("454A82A1-F024-40DB-BD5B-8F527FD58AD0")]
[NativeTypeName("class ID2D1DeviceContextPool : IUnknown")]
@@ -6,7 +6,6 @@
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using TerraFX.Interop.Windows;
#pragma warning disable CS0649, IDE1006
+5 -5
ファイルの表示
@@ -1,7 +1,7 @@
using System.Numerics;
using System.Runtime.InteropServices;
using ABI.Microsoft.Graphics.Canvas.Effects;
using TerraFX.Interop;
using ComputeSharp.Win32;
using Windows.Foundation;
namespace ABI.Microsoft.Graphics.Canvas;
@@ -18,7 +18,7 @@ internal static unsafe class Win2D
/// <param name="image">The input <see cref="ICanvasImageInterop"/> instance to compute the bounds for.</param>
/// <param name="transform">The transform to use (optional).</param>
/// <param name="rect">The resulting bounds.</param>
/// <returns>The <see cref="TerraFX.Interop.Windows.HRESULT"/> for the operation.</returns>
/// <returns>The <see cref="HRESULT"/> for the operation.</returns>
[DllImport("Microsoft.Graphics.Canvas.dll", PreserveSig = true, ExactSpelling = true)]
[return: NativeTypeName("HRESULT")]
public static extern int GetBoundsForICanvasImageInterop(
@@ -34,7 +34,7 @@ internal static unsafe class Win2D
/// <param name="image">The target <see cref="ICanvasImageInterop"/> instance to execute the operation upon.</param>
/// <param name="sourceIndex">The input index to invalidate.</param>
/// <param name="invalidRectangle">The rectangle to invalidate.</param>
/// <returns>The <see cref="TerraFX.Interop.Windows.HRESULT"/> for the operation.</returns>
/// <returns>The <see cref="HRESULT"/> for the operation.</returns>
[DllImport("Microsoft.Graphics.Canvas.dll", PreserveSig = true, ExactSpelling = true)]
[return: NativeTypeName("HRESULT")]
public static extern int InvalidateSourceRectangleForICanvasImageInterop(
@@ -50,7 +50,7 @@ internal static unsafe class Win2D
/// <param name="image">The target <see cref="ICanvasImageInterop"/> instance to execute the operation upon.</param>
/// <param name="valueCount">The resulting length of the COM array returned via <paramref name="valueElements"/>.</param>
/// <param name="valueElements">The COM array with the sequence of invalid rectangles for the effect.</param>
/// <returns>The <see cref="TerraFX.Interop.Windows.HRESULT"/> for the operation.</returns>
/// <returns>The <see cref="HRESULT"/> for the operation.</returns>
[DllImport("Microsoft.Graphics.Canvas.dll", PreserveSig = true, ExactSpelling = true)]
[return: NativeTypeName("HRESULT")]
public static extern int GetInvalidRectanglesForICanvasImageInterop(
@@ -74,7 +74,7 @@ internal static unsafe class Win2D
/// <param name="sourceBounds">The sequence of bounds to consider in the resulting output.</param>
/// <param name="valueCount">The number of elements provided in <paramref name="valueElements"/>.</param>
/// <param name="valueElements">The sequence of resulting required rectangles to compute.</param>
/// <returns>The <see cref="TerraFX.Interop.Windows.HRESULT"/> for the operation.</returns>
/// <returns>The <see cref="HRESULT"/> for the operation.</returns>
[DllImport("Microsoft.Graphics.Canvas.dll", PreserveSig = true, ExactSpelling = true)]
[return: NativeTypeName("HRESULT")]
public static extern int GetRequiredSourceRectanglesForICanvasImageInterop(
+1 -2
ファイルの表示
@@ -3,8 +3,7 @@ using System.Runtime.CompilerServices;
using ABI.Microsoft.Graphics.Canvas;
using ComputeSharp.D2D1.WinUI.Extensions;
using ComputeSharp.D2D1.WinUI.Helpers;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
using Windows.Graphics.Effects;
namespace ComputeSharp.D2D1.WinUI.Buffers;
+1 -2
ファイルの表示
@@ -4,9 +4,8 @@ using System.Numerics;
using ABI.Microsoft.Graphics.Canvas;
using ComputeSharp.D2D1.Extensions;
using ComputeSharp.D2D1.WinUI.Helpers;
using ComputeSharp.Win32;
using Microsoft.Graphics.Canvas;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
using Windows.Foundation;
using ICanvasResourceCreator = Microsoft.Graphics.Canvas.ICanvasResourceCreator;
+4 -6
ファイルの表示
@@ -1,8 +1,6 @@
using ABI.Microsoft.Graphics.Canvas;
using ComputeSharp.D2D1.Extensions;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
using Win32 = TerraFX.Interop.Windows.Windows;
using ComputeSharp.Win32;
namespace ComputeSharp.D2D1.WinUI.Extensions;
@@ -23,14 +21,14 @@ internal static unsafe class ICanvasDeviceExtensions
// Get the ICanvasResourceWrapperNative wrapper around the input device
canvasDevice.QueryInterface(
riid: Win32.__uuidof<ICanvasResourceWrapperNative>(),
riid: Win32.Windows.__uuidof<ICanvasResourceWrapperNative>(),
ppvObject: (void**)canvasDeviceResourceWrapperNative.GetAddressOf()).Assert();
// Get the underlying ID2D1Device1 instance in use
HRESULT hresult = canvasDeviceResourceWrapperNative.Get()->GetNativeResource(
device: null,
dpi: 0,
iid: Win32.__uuidof<ID2D1Device1>(),
iid: Win32.Windows.__uuidof<ID2D1Device1>(),
resource: (void**)d2D1Device1);
return hresult;
@@ -60,7 +58,7 @@ internal static unsafe class ICanvasDeviceExtensions
{
// Get the ID2D1DeviceContextPool interface reference
canvasDevice.QueryInterface(
riid: Win32.__uuidof<ID2D1DeviceContextPool>(),
riid: Win32.Windows.__uuidof<ID2D1DeviceContextPool>(),
ppvObject: (void**)d2D1DeviceContextPool.GetAddressOf()).Assert();
// Get a new ID2D1DeviceContextLease object from the retrieved pool
+1 -2
ファイルの表示
@@ -1,6 +1,5 @@
using ComputeSharp.D2D1.Extensions;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
namespace ComputeSharp.D2D1.WinUI.Extensions;
+1 -2
ファイルの表示
@@ -7,8 +7,7 @@ using ComputeSharp.D2D1.Extensions;
using ComputeSharp.D2D1.Interop;
using ComputeSharp.D2D1.Shaders.Interop.Effects.ResourceManagers;
using ComputeSharp.D2D1.Shaders.Interop.Effects.TransformMappers;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
namespace ComputeSharp.D2D1.WinUI.Extensions;
+3 -4
ファイルの表示
@@ -1,7 +1,6 @@
using System.Runtime.CompilerServices;
using ComputeSharp.D2D1.Extensions;
using TerraFX.Interop.Windows;
using Win32 = TerraFX.Interop.Windows.Windows;
using ComputeSharp.Win32;
namespace ComputeSharp.D2D1.WinUI.Extensions;
@@ -35,8 +34,8 @@ internal static unsafe class IUnknownExtensions
using ComPtr<IUnknown> leftUnknown = default;
using ComPtr<IUnknown> rightUnknown = default;
((IUnknown*)Unsafe.AsPointer(ref left))->QueryInterface(Win32.__uuidof<IUnknown>(), (void**)leftUnknown.GetAddressOf()).Assert();
((IUnknown*)right)->QueryInterface(Win32.__uuidof<IUnknown>(), (void**)rightUnknown.GetAddressOf()).Assert();
((IUnknown*)Unsafe.AsPointer(ref left))->QueryInterface(Win32.Windows.__uuidof<IUnknown>(), (void**)leftUnknown.GetAddressOf()).Assert();
((IUnknown*)right)->QueryInterface(Win32.Windows.__uuidof<IUnknown>(), (void**)rightUnknown.GetAddressOf()).Assert();
return leftUnknown.Get() == rightUnknown.Get();
}
+2 -2
ファイルの表示
@@ -1,8 +1,8 @@
using System;
using System.Diagnostics.CodeAnalysis;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
using WinRT;
using IInspectable = TerraFX.Interop.WinRT.IInspectable;
using IInspectable = ComputeSharp.Win32.IInspectable;
namespace ComputeSharp.D2D1.WinUI.Helpers;
+2 -2
ファイルの表示
@@ -2,14 +2,14 @@ using System;
using System.Diagnostics.CodeAnalysis;
using ABI.Microsoft.Graphics.Canvas;
using ComputeSharp.D2D1.Extensions;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
using Windows.Graphics.Effects;
using WinRT;
namespace ComputeSharp.D2D1.WinUI.Helpers;
using CanvasDevice = Microsoft.Graphics.Canvas.CanvasDevice;
using IInspectable = TerraFX.Interop.WinRT.IInspectable;
using IInspectable = Win32.IInspectable;
/// <summary>
/// A helper type to replicate Win2D's <c>ResourceManager</c> type.
+1 -1
ファイルの表示
@@ -5,7 +5,7 @@ using ABI.Microsoft.Graphics.Canvas;
using ComputeSharp.D2D1.Extensions;
using ComputeSharp.D2D1.WinUI.Helpers;
using ComputeSharp.Interop;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
using Windows.Foundation;
using ICanvasEffect = Microsoft.Graphics.Canvas.Effects.ICanvasEffect;
using ICanvasResourceCreatorWithDpi = Microsoft.Graphics.Canvas.ICanvasResourceCreatorWithDpi;
+1 -3
ファイルの表示
@@ -5,9 +5,7 @@ using ComputeSharp.D2D1.Extensions;
using ComputeSharp.D2D1.Interop;
using ComputeSharp.D2D1.WinUI.Extensions;
using ComputeSharp.D2D1.WinUI.Helpers;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
using TerraFX.Interop.WinRT;
using ComputeSharp.Win32;
namespace ComputeSharp.D2D1.WinUI;
+1 -1
ファイルの表示
@@ -3,7 +3,7 @@ using ABI.Microsoft.Graphics.Canvas;
using ComputeSharp.D2D1.Extensions;
using ComputeSharp.D2D1.WinUI.Helpers;
using ComputeSharp.Interop;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
using Windows.Foundation;
using ICanvasResourceCreator = Microsoft.Graphics.Canvas.ICanvasResourceCreator;
+2 -4
ファイルの表示
@@ -7,12 +7,10 @@ using ComputeSharp.D2D1.Interop;
using ComputeSharp.D2D1.WinUI.Extensions;
using ComputeSharp.D2D1.WinUI.Helpers;
using ComputeSharp.Interop;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
using Windows.Graphics.Effects;
using static ABI.Microsoft.Graphics.Canvas.WIN2D_GET_D2D_IMAGE_FLAGS;
using static ABI.Microsoft.Graphics.Canvas.WIN2D_GET_DEVICE_ASSOCIATION_TYPE;
using Win32 = TerraFX.Interop.Windows.Windows;
namespace ComputeSharp.D2D1.WinUI;
@@ -64,7 +62,7 @@ unsafe partial class PixelShaderEffect<T>
}
// Set the association type if the copy was successful
if (Win32.SUCCEEDED(hresult))
if (Win32.Windows.SUCCEEDED(hresult))
{
*type = WIN2D_GET_DEVICE_ASSOCIATION_TYPE_REALIZATION_DEVICE;
}
+6 -8
ファイルの表示
@@ -7,16 +7,14 @@ using ComputeSharp.D2D1.WinUI.Buffers;
using ComputeSharp.D2D1.WinUI.Extensions;
using ComputeSharp.D2D1.WinUI.Helpers;
using ComputeSharp.Interop;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
using Windows.Graphics.Effects;
using static ABI.Microsoft.Graphics.Canvas.WIN2D_GET_D2D_IMAGE_FLAGS;
using static ABI.Microsoft.Graphics.Canvas.WIN2D_GET_DEVICE_ASSOCIATION_TYPE;
using static TerraFX.Interop.DirectX.D2D1_BORDER_MODE;
using static TerraFX.Interop.DirectX.D2D1_DPICOMPENSATION_INTERPOLATION_MODE;
using static TerraFX.Interop.DirectX.D2D1_DPICOMPENSATION_PROP;
using static TerraFX.Interop.DirectX.D2D1_PROPERTY_TYPE;
using Win32 = TerraFX.Interop.Windows.Windows;
using static ComputeSharp.Win32.D2D1_BORDER_MODE;
using static ComputeSharp.Win32.D2D1_DPICOMPENSATION_INTERPOLATION_MODE;
using static ComputeSharp.Win32.D2D1_DPICOMPENSATION_PROP;
using static ComputeSharp.Win32.D2D1_PROPERTY_TYPE;
namespace ComputeSharp.D2D1.WinUI;
@@ -133,7 +131,7 @@ unsafe partial class PixelShaderEffect<T>
// Try to get the ICanvasImageInterop interface from the input source
HRESULT hresult = RcwMarshaller.GetNativeInterface(value, canvasImageInterop.GetAddressOf());
if (!Win32.SUCCEEDED(hresult))
if (!Win32.Windows.SUCCEEDED(hresult))
{
// Only potentially handle E_NOINTERFACE, always throw in other cases
if (hresult != E.E_NOINTERFACE)
+1 -1
ファイルの表示
@@ -2,8 +2,8 @@ using System;
using ComputeSharp.D2D1.Interop;
using ComputeSharp.D2D1.WinUI.Extensions;
using ComputeSharp.Interop;
using ComputeSharp.Win32;
using Microsoft.Graphics.Canvas;
using TerraFX.Interop.DirectX;
namespace ComputeSharp.D2D1.WinUI;
+1 -1
ファイルの表示
@@ -2,7 +2,7 @@ using System;
using ComputeSharp.Interop;
using System.Runtime.CompilerServices;
using ComputeSharp.D2D1.WinUI.Helpers;
using TerraFX.Interop.Windows;
using ComputeSharp.Win32;
namespace ComputeSharp.D2D1.WinUI;
+1 -2
ファイルの表示
@@ -3,10 +3,9 @@ using ABI.Microsoft.Graphics.Canvas;
using ComputeSharp.D2D1.Descriptors;
using ComputeSharp.D2D1.Interop;
using ComputeSharp.Interop;
using ComputeSharp.Win32;
using Microsoft.Graphics.Canvas;
using Microsoft.Graphics.Canvas.Effects;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
namespace ComputeSharp.D2D1.WinUI;