summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec/ccodec_jpxmodule.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-30 16:12:02 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-30 20:26:02 +0000
commit0bb1333a9eff1190ddd68f34c71d6a779c69dfef (patch)
tree5a46946c4852f147309e2b1389e6f42d6553abf7 /core/fxcodec/codec/ccodec_jpxmodule.h
parent908c848202ef137e98d96f82a4eadfae551403b7 (diff)
downloadpdfium-0bb1333a9eff1190ddd68f34c71d6a779c69dfef.tar.xz
Add some calls to MakeUnique
This CL replaces some new's with pdfium::MakeUnique. Change-Id: I50faf3ed55e7730b094c14a7989a9dd51cf33cbb Reviewed-on: https://pdfium-review.googlesource.com/3430 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/ccodec_jpxmodule.h')
-rw-r--r--core/fxcodec/codec/ccodec_jpxmodule.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fxcodec/codec/ccodec_jpxmodule.h b/core/fxcodec/codec/ccodec_jpxmodule.h
index fd919d91b0..c57002722e 100644
--- a/core/fxcodec/codec/ccodec_jpxmodule.h
+++ b/core/fxcodec/codec/ccodec_jpxmodule.h
@@ -7,6 +7,7 @@
#ifndef CORE_FXCODEC_CODEC_CCODEC_JPXMODULE_H_
#define CORE_FXCODEC_CODEC_CCODEC_JPXMODULE_H_
+#include <memory>
#include <vector>
#include "core/fxcrt/fx_system.h"
@@ -19,9 +20,9 @@ class CCodec_JpxModule {
CCodec_JpxModule();
~CCodec_JpxModule();
- CJPX_Decoder* CreateDecoder(const uint8_t* src_buf,
- uint32_t src_size,
- CPDF_ColorSpace* cs);
+ std::unique_ptr<CJPX_Decoder> CreateDecoder(const uint8_t* src_buf,
+ uint32_t src_size,
+ CPDF_ColorSpace* cs);
void GetImageInfo(CJPX_Decoder* pDecoder,
uint32_t* width,
uint32_t* height,
@@ -30,7 +31,6 @@ class CCodec_JpxModule {
uint8_t* dest_data,
int pitch,
const std::vector<uint8_t>& offsets);
- void DestroyDecoder(CJPX_Decoder* pDecoder);
};
#endif // CORE_FXCODEC_CODEC_CCODEC_JPXMODULE_H_