From d0409afc6a994a3e24043b8a96c83c022bcaa189 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 25 May 2017 15:53:57 -0700 Subject: Mass conversion of remaining class members (non-xfa) Change-Id: I8365ba80e3395d59a3cf35dbd9d9162e86e712e3 Reviewed-on: https://pdfium-review.googlesource.com/5970 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- core/fxcodec/jbig2/JBig2_GrdProc.cpp | 34 ++++++++++++++++++---------------- core/fxcodec/jbig2/JBig2_GrdProc.h | 4 +++- 2 files changed, 21 insertions(+), 17 deletions(-) (limited to 'core/fxcodec/jbig2') diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.cpp b/core/fxcodec/jbig2/JBig2_GrdProc.cpp index 0d9f991d4c..a8140bdd24 100644 --- a/core/fxcodec/jbig2/JBig2_GrdProc.cpp +++ b/core/fxcodec/jbig2/JBig2_GrdProc.cpp @@ -25,6 +25,8 @@ CJBig2_GRDProc::CJBig2_GRDProc() m_ReplaceRect.right = 0; } +CJBig2_GRDProc::~CJBig2_GRDProc() {} + bool CJBig2_GRDProc::UseTemplate0Opt3() const { return (GBAT[0] == 3) && (GBAT[1] == -1) && (GBAT[2] == -3) && (GBAT[3] == -1) && (GBAT[4] == 2) && (GBAT[5] == -2) && @@ -663,35 +665,35 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith(IFX_Pause* pPause) { CJBig2_Image* pImage = *m_pImage; if (GBTEMPLATE == 0) { if (UseTemplate0Opt3()) { - m_ProssiveStatus = decode_Arith_Template0_opt3(pImage, m_pArithDecoder, - m_gbContext, pPause); + m_ProssiveStatus = decode_Arith_Template0_opt3( + pImage, m_pArithDecoder.Get(), m_gbContext, pPause); } else { - m_ProssiveStatus = decode_Arith_Template0_unopt(pImage, m_pArithDecoder, - m_gbContext, pPause); + m_ProssiveStatus = decode_Arith_Template0_unopt( + pImage, m_pArithDecoder.Get(), m_gbContext, pPause); } } else if (GBTEMPLATE == 1) { if (UseTemplate1Opt3()) { - m_ProssiveStatus = decode_Arith_Template1_opt3(pImage, m_pArithDecoder, - m_gbContext, pPause); + m_ProssiveStatus = decode_Arith_Template1_opt3( + pImage, m_pArithDecoder.Get(), m_gbContext, pPause); } else { - m_ProssiveStatus = decode_Arith_Template1_unopt(pImage, m_pArithDecoder, - m_gbContext, pPause); + m_ProssiveStatus = decode_Arith_Template1_unopt( + pImage, m_pArithDecoder.Get(), m_gbContext, pPause); } } else if (GBTEMPLATE == 2) { if (UseTemplate23Opt3()) { - m_ProssiveStatus = decode_Arith_Template2_opt3(pImage, m_pArithDecoder, - m_gbContext, pPause); + m_ProssiveStatus = decode_Arith_Template2_opt3( + pImage, m_pArithDecoder.Get(), m_gbContext, pPause); } else { - m_ProssiveStatus = decode_Arith_Template2_unopt(pImage, m_pArithDecoder, - m_gbContext, pPause); + m_ProssiveStatus = decode_Arith_Template2_unopt( + pImage, m_pArithDecoder.Get(), m_gbContext, pPause); } } else { if (UseTemplate23Opt3()) { - m_ProssiveStatus = decode_Arith_Template3_opt3(pImage, m_pArithDecoder, - m_gbContext, pPause); + m_ProssiveStatus = decode_Arith_Template3_opt3( + pImage, m_pArithDecoder.Get(), m_gbContext, pPause); } else { - m_ProssiveStatus = decode_Arith_Template3_unopt(pImage, m_pArithDecoder, - m_gbContext, pPause); + m_ProssiveStatus = decode_Arith_Template3_unopt( + pImage, m_pArithDecoder.Get(), m_gbContext, pPause); } } m_ReplaceRect.left = 0; diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.h b/core/fxcodec/jbig2/JBig2_GrdProc.h index 447447fe8b..c6e8ae38d0 100644 --- a/core/fxcodec/jbig2/JBig2_GrdProc.h +++ b/core/fxcodec/jbig2/JBig2_GrdProc.h @@ -8,6 +8,7 @@ #define CORE_FXCODEC_JBIG2_JBIG2_GRDPROC_H_ #include "core/fxcodec/fx_codec_def.h" +#include "core/fxcrt/cfx_unowned_ptr.h" #include "core/fxcrt/fx_coordinates.h" #include "core/fxcrt/fx_system.h" @@ -20,6 +21,7 @@ struct JBig2ArithCtx; class CJBig2_GRDProc { public: CJBig2_GRDProc(); + ~CJBig2_GRDProc(); CJBig2_Image* decode_Arith(CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext); @@ -112,7 +114,7 @@ class CJBig2_GRDProc { uint8_t* m_pLine; FXCODEC_STATUS m_ProssiveStatus; CJBig2_Image** m_pImage; - CJBig2_ArithDecoder* m_pArithDecoder; + CFX_UnownedPtr m_pArithDecoder; JBig2ArithCtx* m_gbContext; uint16_t m_DecodeType; int m_LTP; -- cgit v1.2.3