|
|
@ -8,7 +8,7 @@ using SixLabors.ImageSharp.Memory; |
|
|
|
|
|
|
|
|
namespace SixLabors.ImageSharp.Formats.Webp.Lossless |
|
|
namespace SixLabors.ImageSharp.Formats.Webp.Lossless |
|
|
{ |
|
|
{ |
|
|
internal class Vp8LHashChain : IDisposable |
|
|
internal sealed class Vp8LHashChain : IDisposable |
|
|
{ |
|
|
{ |
|
|
private const uint HashMultiplierHi = 0xc6a4a793u; |
|
|
private const uint HashMultiplierHi = 0xc6a4a793u; |
|
|
|
|
|
|
|
|
@ -30,8 +30,6 @@ namespace SixLabors.ImageSharp.Formats.Webp.Lossless |
|
|
|
|
|
|
|
|
private readonly MemoryAllocator memoryAllocator; |
|
|
private readonly MemoryAllocator memoryAllocator; |
|
|
|
|
|
|
|
|
private bool disposed; |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Initializes a new instance of the <see cref="Vp8LHashChain"/> class.
|
|
|
/// Initializes a new instance of the <see cref="Vp8LHashChain"/> class.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
@ -288,24 +286,7 @@ namespace SixLabors.ImageSharp.Formats.Webp.Lossless |
|
|
return maxWindowSize > WindowSize ? WindowSize : maxWindowSize; |
|
|
return maxWindowSize > WindowSize ? WindowSize : maxWindowSize; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected virtual void Dispose(bool disposing) |
|
|
|
|
|
{ |
|
|
|
|
|
if (!this.disposed) |
|
|
|
|
|
{ |
|
|
|
|
|
if (disposing) |
|
|
|
|
|
{ |
|
|
|
|
|
this.OffsetLength.Dispose(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.disposed = true; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
/// <inheritdoc />
|
|
|
public void Dispose() |
|
|
public void Dispose() => this.OffsetLength.Dispose(); |
|
|
{ |
|
|
|
|
|
this.Dispose(disposing: true); |
|
|
|
|
|
GC.SuppressFinalize(this); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|