Rename ArrayPoolBufferWriter type for consistency

このコミットが含まれているのは:
Sergio Pedri committed 2023-10-01 11:33:52 +02:00
1 親 277b9a6354
コミット dba631bf3b
2ファイル変更
+4 -5

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

+3 -4
ファイルの表示
@@ -15,7 +15,7 @@ namespace ComputeSharp.D2D1.Shaders.Interop.Buffers;
/// <summary>
/// Represents a heap-based, array-backed output sink into which binary data can be written.
/// </summary>
internal ref struct ArrayPoolBufferWriter
internal ref struct ArrayPoolBinaryWriter
{
/// <summary>
/// The default buffer size to use to expand empty arrays.
@@ -33,9 +33,9 @@ internal ref struct ArrayPoolBufferWriter
private int index;
/// <summary>
/// Initializes a new instance of the <see cref="ArrayPoolBufferWriter"/> type.
/// Initializes a new instance of the <see cref="ArrayPoolBinaryWriter"/> type.
/// </summary>
public ArrayPoolBufferWriter(int capacity)
public ArrayPoolBinaryWriter(int capacity)
{
this.array = ArrayPool<byte>.Shared.Rent(capacity);
this.index = 0;
@@ -111,7 +111,6 @@ internal ref struct ArrayPoolBufferWriter
byte[]? array = this.array;
default(ObjectDisposedException).ThrowIfNull(array);
default(ArgumentOutOfRangeException).ThrowIfNegative(count);
default(ArgumentException).ThrowIf(this.index > array.Length - count);
this.index += count;
+1 -1
ファイルの表示
@@ -244,7 +244,7 @@ public static unsafe class D2D1PixelShaderEffect
public static ReadOnlyMemory<byte> GetRegistrationBlob<T>(out Guid effectId)
where T : unmanaged, ID2D1PixelShader, ID2D1PixelShaderDescriptor<T>
{
ArrayPoolBufferWriter writer = new(ArrayPoolBufferWriter.DefaultInitialBufferSize);
ArrayPoolBinaryWriter writer = new(ArrayPoolBinaryWriter.DefaultInitialBufferSize);
// Blob id
writer.Write(D2D1EffectRegistrationData.V1.BlobId);