diff --git a/src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.Properties.cs b/src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.Properties.cs index 35a3d39d..79e84861 100644 --- a/src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.Properties.cs +++ b/src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.Properties.cs @@ -1,16 +1,8 @@ using System; -#if WINDOWS_UWP -using Windows.UI.Xaml; -#else using Microsoft.UI.Xaml; -#endif using Windows.Foundation; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp; -#else namespace ComputeSharp.WinUI; -#endif /// partial class AnimatedComputeShaderPanel diff --git a/src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.cs b/src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.cs index d486235a..d64c7f97 100644 --- a/src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.cs +++ b/src/ComputeSharp.WinUI/Controls/AnimatedComputeShaderPanel.cs @@ -1,19 +1,9 @@ using System; -#if WINDOWS_UWP -using ComputeSharp.Uwp.Helpers; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -#else using ComputeSharp.WinUI.Helpers; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; -#endif -#if WINDOWS_UWP -namespace ComputeSharp.Uwp; -#else namespace ComputeSharp.WinUI; -#endif /// /// diff --git a/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.Properties.cs b/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.Properties.cs index 2c5e37f5..aee683e9 100644 --- a/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.Properties.cs +++ b/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.Properties.cs @@ -1,16 +1,8 @@ using System; -#if WINDOWS_UWP -using Windows.UI.Xaml; -#else using Microsoft.UI.Xaml; -#endif using Windows.Foundation; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp; -#else namespace ComputeSharp.WinUI; -#endif /// partial class ComputeShaderPanel diff --git a/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.cs b/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.cs index dfeb8554..d68db8e9 100644 --- a/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.cs +++ b/src/ComputeSharp.WinUI/Controls/ComputeShaderPanel.cs @@ -1,19 +1,9 @@ using System; -#if WINDOWS_UWP -using ComputeSharp.Uwp.Helpers; -using Windows.UI.Xaml; -using Windows.UI.Xaml.Controls; -#else using ComputeSharp.WinUI.Helpers; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; -#endif -#if WINDOWS_UWP -namespace ComputeSharp.Uwp; -#else namespace ComputeSharp.WinUI; -#endif /// /// diff --git a/src/ComputeSharp.WinUI/Controls/RenderingFailedEventArgs.cs b/src/ComputeSharp.WinUI/Controls/RenderingFailedEventArgs.cs index c65ee832..c4d38d72 100644 --- a/src/ComputeSharp.WinUI/Controls/RenderingFailedEventArgs.cs +++ b/src/ComputeSharp.WinUI/Controls/RenderingFailedEventArgs.cs @@ -1,10 +1,6 @@ using System; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp; -#else namespace ComputeSharp.WinUI; -#endif /// /// The arguments for the and events. diff --git a/src/ComputeSharp.WinUI/Extensions/IDXGIAdapterExtensions.cs b/src/ComputeSharp.WinUI/Extensions/IDXGIAdapterExtensions.cs index e9878637..1d581f8a 100644 --- a/src/ComputeSharp.WinUI/Extensions/IDXGIAdapterExtensions.cs +++ b/src/ComputeSharp.WinUI/Extensions/IDXGIAdapterExtensions.cs @@ -5,11 +5,7 @@ using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; using Win32 = TerraFX.Interop.Windows.Windows; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp.Extensions; -#else namespace ComputeSharp.WinUI.Extensions; -#endif /// /// A with extensions for the type. diff --git a/src/ComputeSharp.WinUI/Extensions/SemaphoreSlimExtensions.cs b/src/ComputeSharp.WinUI/Extensions/SemaphoreSlimExtensions.cs index 750e637d..33db32fd 100644 --- a/src/ComputeSharp.WinUI/Extensions/SemaphoreSlimExtensions.cs +++ b/src/ComputeSharp.WinUI/Extensions/SemaphoreSlimExtensions.cs @@ -5,11 +5,7 @@ using System.Threading.Tasks; #pragma warning disable CS0618 -#if WINDOWS_UWP -namespace ComputeSharp.Uwp.Extensions; -#else namespace ComputeSharp.WinUI.Extensions; -#endif /// /// A helper type for . diff --git a/src/ComputeSharp.WinUI/Helpers/DynamicResolutionManager.cs b/src/ComputeSharp.WinUI/Helpers/DynamicResolutionManager.cs index fc7d0e55..0f99d50c 100644 --- a/src/ComputeSharp.WinUI/Helpers/DynamicResolutionManager.cs +++ b/src/ComputeSharp.WinUI/Helpers/DynamicResolutionManager.cs @@ -2,11 +2,7 @@ using System; using System.Runtime.CompilerServices; using System.Threading; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp.Helpers; -#else namespace ComputeSharp.WinUI.Helpers; -#endif /// /// A helper type that is responsible for applying dynamic resolution changes. diff --git a/src/ComputeSharp.WinUI/Helpers/SwapChainManager.Rendering.cs b/src/ComputeSharp.WinUI/Helpers/SwapChainManager.Rendering.cs index d35d92b4..a15b7599 100644 --- a/src/ComputeSharp.WinUI/Helpers/SwapChainManager.Rendering.cs +++ b/src/ComputeSharp.WinUI/Helpers/SwapChainManager.Rendering.cs @@ -3,17 +3,9 @@ using System.Diagnostics; using System.Runtime.CompilerServices; using System.Threading; using ComputeSharp.Interop; -#if WINDOWS_UWP -using ComputeSharp.Uwp.Extensions; -#else using ComputeSharp.WinUI.Extensions; -#endif -#if WINDOWS_UWP -namespace ComputeSharp.Uwp.Helpers; -#else namespace ComputeSharp.WinUI.Helpers; -#endif #pragma warning disable CS0420 diff --git a/src/ComputeSharp.WinUI/Helpers/SwapChainManager.cs b/src/ComputeSharp.WinUI/Helpers/SwapChainManager.cs index efcd2acb..a81a0cc8 100644 --- a/src/ComputeSharp.WinUI/Helpers/SwapChainManager.cs +++ b/src/ComputeSharp.WinUI/Helpers/SwapChainManager.cs @@ -1,40 +1,21 @@ using System; using System.Diagnostics; using System.Runtime.CompilerServices; -#if WINDOWS_UWP -using System.Runtime.InteropServices; -#endif using System.Threading; using ComputeSharp.Core.Extensions; using ComputeSharp.Graphics.Helpers; using ComputeSharp.Interop; -#if WINDOWS_UWP -using ComputeSharp.Uwp.Extensions; -#else using ComputeSharp.WinUI.Extensions; -#endif -#if !WINDOWS_UWP using Microsoft.UI.Dispatching; using Microsoft.UI.Xaml.Controls; -#endif using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; using TerraFX.Interop.WinRT; -#if WINDOWS_UWP -using Windows.Foundation; -using Windows.UI.Xaml.Controls; -using Windows.System; -#else using Windows.Foundation; using WinRT; -#endif using Win32 = TerraFX.Interop.Windows.Windows; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp.Helpers; -#else namespace ComputeSharp.WinUI.Helpers; -#endif /// /// A type managing rendering on a target swap chain object. @@ -243,17 +224,11 @@ internal sealed unsafe partial class SwapChainManager : ReferenceTracked { using ComPtr swapChainPanel = default; -#if WINDOWS_UWP - swapChainPanel.Attach((IUnknown*)Marshal.GetIUnknownForObject(owner)); - - swapChainPanel.CopyTo(swapChainPanelNative).Assert(); -#else swapChainPanel.Attach((IUnknown*)((IWinRTObject)owner).NativeObject.GetRef()); swapChainPanel.CopyTo( (Guid*)Unsafe.AsPointer(ref Unsafe.AsRef(new Guid(0x63AAD0B8, 0x7C24, 0x40FF, 0x85, 0xA8, 0x64, 0x0D, 0x94, 0x4C, 0xC3, 0x25))), (void**)swapChainPanelNative).Assert(); -#endif } // Get the underlying ID3D12Device in use diff --git a/src/ComputeSharp.WinUI/IFrameRequestQueue.cs b/src/ComputeSharp.WinUI/IFrameRequestQueue.cs index 59d0ebd6..416debd6 100644 --- a/src/ComputeSharp.WinUI/IFrameRequestQueue.cs +++ b/src/ComputeSharp.WinUI/IFrameRequestQueue.cs @@ -1,10 +1,6 @@ using System.Threading; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp; -#else namespace ComputeSharp.WinUI; -#endif /// /// An interface for a shader runner to be used with . diff --git a/src/ComputeSharp.WinUI/IShaderRunner.cs b/src/ComputeSharp.WinUI/IShaderRunner.cs index 23e7d337..95cab2c7 100644 --- a/src/ComputeSharp.WinUI/IShaderRunner.cs +++ b/src/ComputeSharp.WinUI/IShaderRunner.cs @@ -1,10 +1,6 @@ using System; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp; -#else namespace ComputeSharp.WinUI; -#endif /// /// An interface for a shader runner to be used with or . diff --git a/src/ComputeSharp.WinUI/ShaderRunner{T}.cs b/src/ComputeSharp.WinUI/ShaderRunner{T}.cs index 8b355863..7ed4ce51 100644 --- a/src/ComputeSharp.WinUI/ShaderRunner{T}.cs +++ b/src/ComputeSharp.WinUI/ShaderRunner{T}.cs @@ -1,10 +1,6 @@ using System; -#if WINDOWS_UWP -namespace ComputeSharp.Uwp; -#else namespace ComputeSharp.WinUI; -#endif /// /// A simple implementation powered by a supplied shader type.