Add partial ICanvasEffect support to PixelShaderEffect<T>
このコミットが含まれているのは:
1 親
ad400fbd3b
コミット
4043ba2bf9
3ファイル変更
+52
-9
検索条件に一致するファイルはありません
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using Microsoft.Graphics.Canvas;
|
||||
using Microsoft.Graphics.Canvas.Effects;
|
||||
using Windows.Foundation;
|
||||
|
||||
namespace ComputeSharp.D2D1.Uwp;
|
||||
|
||||
/// <inheritdoc/>
|
||||
partial class PixelShaderEffect<T>
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
void ICanvasEffect.InvalidateSourceRectangle(ICanvasResourceCreatorWithDpi resourceCreator, uint sourceIndex, Rect invalidRectangle)
|
||||
{
|
||||
throw new NotSupportedException("ICanvasEffect.InvalidateSourceRectangle is not currently supported.");
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
Rect[] ICanvasEffect.GetInvalidRectangles(ICanvasResourceCreatorWithDpi resourceCreator)
|
||||
{
|
||||
throw new NotSupportedException("ICanvasEffect.GetInvalidRectangles is not currently supported.");
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
Rect ICanvasEffect.GetRequiredSourceRectangle(
|
||||
ICanvasResourceCreatorWithDpi resourceCreator,
|
||||
Rect outputRectangle,
|
||||
ICanvasEffect sourceEffect,
|
||||
uint sourceIndex,
|
||||
Rect sourceBounds)
|
||||
{
|
||||
throw new NotSupportedException("ICanvasEffect.GetRequiredSourceRectangle is not currently supported.");
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
Rect[] ICanvasEffect.GetRequiredSourceRectangles(
|
||||
ICanvasResourceCreatorWithDpi resourceCreator,
|
||||
Rect outputRectangle,
|
||||
ICanvasEffect[] sourceEffects,
|
||||
uint[] sourceIndices,
|
||||
Rect[] sourceBounds)
|
||||
{
|
||||
throw new NotSupportedException("ICanvasEffect.GetRequiredSourceRectangles is not currently supported.");
|
||||
}
|
||||
}
|
||||
@@ -28,25 +28,23 @@ partial class PixelShaderEffect<T>
|
||||
set => SetTransformMapper(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether to enable caching the output from drawing this effect.
|
||||
/// </summary>
|
||||
/// <inheritdoc/>
|
||||
public bool CacheOutput
|
||||
{
|
||||
get => GetCacheOutput();
|
||||
set => SetCacheOutput(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the precision to use for intermediate buffers when drawing this effect.
|
||||
/// </summary>
|
||||
/// <remarks>If <see langword="null"/>, the default precision for effects will be used.</remarks>
|
||||
/// <inheritdoc/>
|
||||
public CanvasBufferPrecision? BufferPrecision
|
||||
{
|
||||
get => GetBufferPrecision();
|
||||
set => SetBufferPrecision(value);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="SourceCollection"/> object associated with the current instance.
|
||||
/// </summary>
|
||||
|
||||
@@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// A custom <see cref="ICanvasImage"/> implementation powered by a supplied shader type.
|
||||
/// A custom <see cref="ICanvasEffect"/> implementation powered by a supplied shader type.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of shader to use to render frames.</typeparam>
|
||||
public sealed partial class PixelShaderEffect<T> : IReferenceTrackedObject, ICanvasImage, ICanvasImageInterop.Interface
|
||||
public sealed partial class PixelShaderEffect<T> : IReferenceTrackedObject, ICanvasEffect, ICanvasImageInterop.Interface
|
||||
where T : unmanaged, ID2D1PixelShader
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする