diff --git a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/Bytes.cs b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/Bytes.cs index 3fc46093e..2a3817400 100644 --- a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/Bytes.cs +++ b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/Bytes.cs @@ -2,12 +2,9 @@ // Licensed under the Apache License, Version 2.0. using System; -using System.Buffers; using System.IO; using System.Runtime.CompilerServices; -using SixLabors.ImageSharp.Memory; - namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder { /// @@ -54,9 +51,8 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder /// /// Creates a new instance of the , and initializes it's buffer. /// - /// The to use for buffer allocations. /// The bytes created - public static Bytes Create(MemoryManager memoryManager) + public static Bytes Create() { // DO NOT bother with buffers and array pooling here! // It only makes things worse! diff --git a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/InputProcessor.cs b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/InputProcessor.cs index 3bef32551..d88481ba4 100644 --- a/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/InputProcessor.cs +++ b/src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/InputProcessor.cs @@ -28,13 +28,12 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder /// /// Initializes a new instance of the struct. /// - /// The to use for buffer allocations. /// The input /// Temporal buffer, same as - public InputProcessor(MemoryManager memoryManager, Stream inputStream, byte[] temp) + public InputProcessor(Stream inputStream, byte[] temp) { this.Bits = default(Bits); - this.Bytes = Bytes.Create(memoryManager); + this.Bytes = Bytes.Create(); this.InputStream = inputStream; this.Temp = temp; this.LastErrorCode = OrigDecoderErrorCode.NoError; diff --git a/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs b/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs index ddc294fa4..33d625725 100644 --- a/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs +++ b/src/ImageSharp/Formats/Jpeg/GolangPort/OrigJpegDecoderCore.cs @@ -231,7 +231,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.GolangPort { this.MetaData = new ImageMetaData(); this.InputStream = stream; - this.InputProcessor = new InputProcessor(this.configuration.MemoryManager, stream, this.Temp); + this.InputProcessor = new InputProcessor(stream, this.Temp); // Check for the Start Of Image marker. this.InputProcessor.ReadFull(this.Temp, 0, 2);