blob: dc1575af5a1c08e8907ade6a91c82768bcd26462 [file] [log] [blame]
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "core/fxcodec/codec/ccodec_jpxmodule.h"
#include "third_party/base/ptr_util.h"
// static
std::unique_ptr<CJPX_Decoder> CCodec_JpxModule::CreateDecoder(
pdfium::span<const uint8_t> src_span,
CJPX_Decoder::ColorSpaceOption option) {
auto decoder = pdfium::MakeUnique<CJPX_Decoder>(option);
if (!decoder->Init(src_span))
return nullptr;
return decoder;
}