From a674abcdee0c614caaea3c48d65c952de43d02de Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Tue, 28 Jan 2020 03:12:18 +0100 Subject: [PATCH] bufferLengthAlignment --- .../Memory/DiscontinuousProto/UniformMemoryGroup{T}.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ImageSharp/Memory/DiscontinuousProto/UniformMemoryGroup{T}.cs b/src/ImageSharp/Memory/DiscontinuousProto/UniformMemoryGroup{T}.cs index 4d89fbf72..974f68aac 100644 --- a/src/ImageSharp/Memory/DiscontinuousProto/UniformMemoryGroup{T}.cs +++ b/src/ImageSharp/Memory/DiscontinuousProto/UniformMemoryGroup{T}.cs @@ -24,11 +24,12 @@ namespace SixLabors.ImageSharp.Memory.DiscontinuousProto public bool IsValid { get; protected set; } - public static UniformMemoryGroup Allocate(MemoryAllocator allocator, long length) + // bufferLengthAlignment == image.Width in row-major images + public static UniformMemoryGroup Allocate(MemoryAllocator allocator, long length, int bufferLengthAlignment) { long bufferCount = length / allocator.GetMaximumContiguousBufferLength(); - // TODO: Allocate bufferCount buffers + // TODO: Adjust bufferCount to bufferLengthAlignment, and allocate bufferCount buffers throw new NotImplementedException(); }