Move constructor, add resource texture manager collection

このコミットが含まれているのは:
Sergio Pedri committed 2022-12-22 10:56:03 -08:00
1 親 68bf5fe9b3
コミット 4a5bf75db6
3ファイル変更
+65 -9

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

+54 -1
ファイルの表示
@@ -51,13 +51,32 @@ partial class PixelShaderEffect<T>
/// <summary>
/// Gets the <see cref="SourceCollection"/> object associated with the current instance.
/// </summary>
public SourceCollection Sources { get; } = new();
public SourceCollection Sources { get; }
/// <summary>
/// Gets the <see cref="ResourceTextureManagerCollection"/> object associated with the current instance.
/// </summary>
public ResourceTextureManagerCollection ResourceTextureManagers { get; }
/// <summary>
/// Represents the collection of <see cref="IGraphicsEffectSource"/> sources in a <see cref="PixelShaderEffect{T}"/> instance.
/// </summary>
public sealed class SourceCollection
{
/// <summary>
/// Creates a new <see cref="SourceCollection"/> instance with the specified parameters.
/// </summary>
/// <param name="owner">The owning <see cref="PixelShaderEffect{T}"/> instance.</param>
internal SourceCollection(PixelShaderEffect<T> owner)
{
Owner = owner;
}
/// <summary>
/// The owning <see cref="PixelShaderEffect{T}"/> instance.
/// </summary>
internal PixelShaderEffect<T> Owner { get; }
/// <summary>
/// Gets or sets the <see cref="IGraphicsEffectSource"/> source at a specified index.
/// </summary>
@@ -70,4 +89,38 @@ partial class PixelShaderEffect<T>
set { }
}
}
/// <summary>
/// Represents the collection of <see cref="D2D1ResourceTextureManager"/> objects in a <see cref="PixelShaderEffect{T}"/> instance.
/// </summary>
public sealed class ResourceTextureManagerCollection
{
/// <summary>
/// Creates a new <see cref="ResourceTextureManagerCollection"/> instance with the specified parameters.
/// </summary>
/// <param name="owner">The owning <see cref="PixelShaderEffect{T}"/> instance.</param>
internal ResourceTextureManagerCollection(PixelShaderEffect<T> owner)
{
Owner = owner;
}
/// <summary>
/// The owning <see cref="PixelShaderEffect{T}"/> instance.
/// </summary>
internal PixelShaderEffect<T> Owner { get; }
/// <summary>
/// Gets or sets the <see cref="D2D1ResourceTextureManager"/> object at a specified index.
/// </summary>
/// <param name="index">The index of the <see cref="D2D1ResourceTextureManager"/> source to get or set.</param>
/// <returns>The <see cref="D2D1ResourceTextureManager"/> object at the specified index.</returns>
/// <exception cref="ArgumentNullException">Thrown if the value is set to <see langword="null"/>.</exception>
/// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="index"/> is not a valid index for the current effect.</exception>
[DisallowNull]
public D2D1ResourceTextureManager this[int index]
{
get => null!;
set { }
}
}
}
-8
ファイルの表示
@@ -7,14 +7,6 @@ namespace ComputeSharp.D2D1.Uwp;
/// <inheritdoc/>
partial class PixelShaderEffect<T>
{
/// <summary>
/// Creates a new <see cref="PixelShaderEffect{T}"/> instance.
/// </summary>
public PixelShaderEffect()
{
this.referenceTracker = new();
}
/// <summary>
/// Releases unmanaged resources and performs other cleanup operations.
/// </summary>
+11
ファイルの表示
@@ -63,4 +63,15 @@ public sealed partial class PixelShaderEffect<T> : IReferenceTrackedObject, ICan
/// The backing field for <see cref="BufferPrecision"/>.
/// </summary>
private D2D1_BUFFER_PRECISION d2D1BufferPrecision;
/// <summary>
/// Creates a new <see cref="PixelShaderEffect{T}"/> instance.
/// </summary>
public PixelShaderEffect()
{
this.referenceTracker = new ReferenceTracker(this);
Sources = new SourceCollection(this);
ResourceTextureManagers = new ResourceTextureManagerCollection(this);
}
}