summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec/ccodec_tiffmodule.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-06-01 12:29:09 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-06-01 20:14:44 +0000
commit5171a27eaa7489939310bd2864864867cc78ce21 (patch)
tree3c4a0cf4a4d4296ddc2c92c39850a5821f21e5cd /core/fxcodec/codec/ccodec_tiffmodule.h
parent5f34d479d06ebab9079c2d0704dee872cc45dd86 (diff)
downloadpdfium-5171a27eaa7489939310bd2864864867cc78ce21.tar.xz
Use unique_ptrs for codec contexts in ccodec_progressivedecoder.chromium/3118
Change-Id: I4deaf8ca946c2dcb6842c5702b02eed1c22b1201 Reviewed-on: https://pdfium-review.googlesource.com/6191 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/ccodec_tiffmodule.h')
-rw-r--r--core/fxcodec/codec/ccodec_tiffmodule.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/core/fxcodec/codec/ccodec_tiffmodule.h b/core/fxcodec/codec/ccodec_tiffmodule.h
index be791e5cc2..73d9c37992 100644
--- a/core/fxcodec/codec/ccodec_tiffmodule.h
+++ b/core/fxcodec/codec/ccodec_tiffmodule.h
@@ -7,27 +7,31 @@
#ifndef CORE_FXCODEC_CODEC_CCODEC_TIFFMODULE_H_
#define CORE_FXCODEC_CODEC_CCODEC_TIFFMODULE_H_
+#include <memory>
+
#include "core/fxcrt/cfx_retain_ptr.h"
#include "core/fxcrt/fx_system.h"
#include "core/fxge/dib/cfx_dibitmap.h"
-class CCodec_TiffContext;
class CFX_DIBAttribute;
class CCodec_TiffModule {
public:
- CCodec_TiffContext* CreateDecoder(
+ class Context {
+ public:
+ virtual ~Context() {}
+ };
+
+ std::unique_ptr<Context> CreateDecoder(
const CFX_RetainPtr<IFX_SeekableReadStream>& file_ptr);
- bool LoadFrameInfo(CCodec_TiffContext* ctx,
+ bool LoadFrameInfo(Context* ctx,
int32_t frame,
int32_t* width,
int32_t* height,
int32_t* comps,
int32_t* bpc,
CFX_DIBAttribute* pAttribute);
- bool Decode(CCodec_TiffContext* ctx,
- const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap);
- void DestroyDecoder(CCodec_TiffContext* ctx);
+ bool Decode(Context* ctx, const CFX_RetainPtr<CFX_DIBitmap>& pDIBitmap);
};
#endif // CORE_FXCODEC_CODEC_CCODEC_TIFFMODULE_H_