Switch D2D1 UWP/WinUI samples to use CanvasEffect
This replaces the ID2D1ShaderRunner interface in the sample apps
このコミットが含まれているのは:
1 親
2578cf3028
コミット
a291685aff
12ファイル変更
+219
-166
検索条件に一致するファイルはありません
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Numerics;
|
||||
using ABI.Microsoft.Graphics.Canvas;
|
||||
using ComputeSharp.D2D1.Extensions;
|
||||
@@ -65,6 +66,7 @@ unsafe partial class CanvasEffect
|
||||
/// </summary>
|
||||
/// <returns>The current <see cref="ICanvasImage"/> instance.</returns>
|
||||
/// <exception cref="ObjectDisposedException">Thrown if the current instance is disposed.</exception>
|
||||
[MemberNotNull(nameof(canvasImage))]
|
||||
private ICanvasImage GetCanvasImage()
|
||||
{
|
||||
lock (this.lockObject)
|
||||
|
||||
@@ -155,14 +155,6 @@ public abstract partial class CanvasEffect : ICanvasImage, ICanvasImageInterop.I
|
||||
InvalidateEffectGraph(invalidationType);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(disposing: true);
|
||||
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disposes any disposable resources in the current instance.
|
||||
/// </summary>
|
||||
@@ -211,6 +203,14 @@ public abstract partial class CanvasEffect : ICanvasImage, ICanvasImageInterop.I
|
||||
this.isDisposed = true;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(disposing: true);
|
||||
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indicates the invalidation type to request when invoking <see cref="InvalidateEffectGraph"/> and related methods.
|
||||
/// </summary>
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする