diff --git a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.ICanvasEffect.cs b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.ICanvasEffect.cs new file mode 100644 index 00000000..752418cc --- /dev/null +++ b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.ICanvasEffect.cs @@ -0,0 +1,44 @@ +using System; +using Microsoft.Graphics.Canvas; +using Microsoft.Graphics.Canvas.Effects; +using Windows.Foundation; + +namespace ComputeSharp.D2D1.Uwp; + +/// +partial class PixelShaderEffect +{ + /// + void ICanvasEffect.InvalidateSourceRectangle(ICanvasResourceCreatorWithDpi resourceCreator, uint sourceIndex, Rect invalidRectangle) + { + throw new NotSupportedException("ICanvasEffect.InvalidateSourceRectangle is not currently supported."); + } + + /// + Rect[] ICanvasEffect.GetInvalidRectangles(ICanvasResourceCreatorWithDpi resourceCreator) + { + throw new NotSupportedException("ICanvasEffect.GetInvalidRectangles is not currently supported."); + } + + /// + Rect ICanvasEffect.GetRequiredSourceRectangle( + ICanvasResourceCreatorWithDpi resourceCreator, + Rect outputRectangle, + ICanvasEffect sourceEffect, + uint sourceIndex, + Rect sourceBounds) + { + throw new NotSupportedException("ICanvasEffect.GetRequiredSourceRectangle is not currently supported."); + } + + /// + Rect[] ICanvasEffect.GetRequiredSourceRectangles( + ICanvasResourceCreatorWithDpi resourceCreator, + Rect outputRectangle, + ICanvasEffect[] sourceEffects, + uint[] sourceIndices, + Rect[] sourceBounds) + { + throw new NotSupportedException("ICanvasEffect.GetRequiredSourceRectangles is not currently supported."); + } +} \ No newline at end of file diff --git a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.Properties.cs b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.Properties.cs index 05098a6a..71882ab1 100644 --- a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.Properties.cs +++ b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.Properties.cs @@ -28,25 +28,23 @@ partial class PixelShaderEffect set => SetTransformMapper(value); } - /// - /// Gets or sets a value indicating whether to enable caching the output from drawing this effect. - /// + /// public bool CacheOutput { get => GetCacheOutput(); set => SetCacheOutput(value); } - /// - /// Gets or sets the precision to use for intermediate buffers when drawing this effect. - /// - /// If , the default precision for effects will be used. + /// public CanvasBufferPrecision? BufferPrecision { get => GetBufferPrecision(); set => SetBufferPrecision(value); } + /// + public string? Name { get; set; } + /// /// Gets the object associated with the current instance. /// diff --git a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.cs b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.cs index dd4d9c0a..7c3c389c 100644 --- a/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.cs +++ b/src/ComputeSharp.D2D1.Uwp/PixelShaderEffect{T}.cs @@ -2,16 +2,17 @@ using ABI.Microsoft.Graphics.Canvas; using ComputeSharp.D2D1.Interop; using ComputeSharp.Interop; using Microsoft.Graphics.Canvas; +using Microsoft.Graphics.Canvas.Effects; using TerraFX.Interop.DirectX; using TerraFX.Interop.Windows; namespace ComputeSharp.D2D1.Uwp; /// -/// A custom implementation powered by a supplied shader type. +/// A custom implementation powered by a supplied shader type. /// /// The type of shader to use to render frames. -public sealed partial class PixelShaderEffect : IReferenceTrackedObject, ICanvasImage, ICanvasImageInterop.Interface +public sealed partial class PixelShaderEffect : IReferenceTrackedObject, ICanvasEffect, ICanvasImageInterop.Interface where T : unmanaged, ID2D1PixelShader { ///