Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1181)

Unified Diff: core/fxcodec/codec/ccodec_jbig2module.h

Issue 2149903002: Use smart pointers for various Jbig2 decoding contexts (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_render/render_int.h ('k') | core/fxcodec/codec/fx_codec_jbig.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcodec/codec/ccodec_jbig2module.h
diff --git a/core/fxcodec/codec/ccodec_jbig2module.h b/core/fxcodec/codec/ccodec_jbig2module.h
index 63e63afcfa71d5cac1fcd7d22d2950cc497b3bdd..5d77d53619613daf9a96d0c4692db8087c24baf6 100644
--- a/core/fxcodec/codec/ccodec_jbig2module.h
+++ b/core/fxcodec/codec/ccodec_jbig2module.h
@@ -20,7 +20,7 @@ class IFX_Pause;
class CCodec_Jbig2Context {
public:
CCodec_Jbig2Context();
- ~CCodec_Jbig2Context() {}
+ ~CCodec_Jbig2Context();
uint32_t m_width;
uint32_t m_height;
@@ -29,8 +29,7 @@ class CCodec_Jbig2Context {
uint8_t* m_dest_buf;
uint32_t m_dest_pitch;
IFX_Pause* m_pPause;
- CJBig2_Context* m_pContext;
- CJBig2_Image* m_dest_image;
+ std::unique_ptr<CJBig2_Context> m_pContext;
};
class CCodec_Jbig2Module {
@@ -38,7 +37,6 @@ class CCodec_Jbig2Module {
CCodec_Jbig2Module() {}
~CCodec_Jbig2Module();
- CCodec_Jbig2Context* CreateJbig2Context();
FXCODEC_STATUS StartDecode(CCodec_Jbig2Context* pJbig2Context,
std::unique_ptr<CFX_Deletable>* pContextHolder,
uint32_t width,
@@ -50,7 +48,6 @@ class CCodec_Jbig2Module {
IFX_Pause* pPause);
FXCODEC_STATUS ContinueDecode(CCodec_Jbig2Context* pJbig2Context,
IFX_Pause* pPause);
- void DestroyJbig2Context(CCodec_Jbig2Context* pJbig2Context);
};
#endif // CORE_FXCODEC_CODEC_CCODEC_JBIG2MODULE_H_
« no previous file with comments | « core/fpdfapi/fpdf_render/render_int.h ('k') | core/fxcodec/codec/fx_codec_jbig.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698