diff options
Diffstat (limited to 'core/fxcodec/jbig2')
-rw-r--r-- | core/fxcodec/jbig2/JBig2_Context.cpp | 25 | ||||
-rw-r--r-- | core/fxcodec/jbig2/JBig2_Context.h | 22 | ||||
-rw-r--r-- | core/fxcodec/jbig2/JBig2_GrdProc.cpp | 24 | ||||
-rw-r--r-- | core/fxcodec/jbig2/JBig2_GrdProc.h | 24 | ||||
-rw-r--r-- | core/fxcodec/jbig2/JBig2_HtrdProc.cpp | 2 | ||||
-rw-r--r-- | core/fxcodec/jbig2/JBig2_HtrdProc.h | 4 | ||||
-rw-r--r-- | core/fxcodec/jbig2/JBig2_PddProc.cpp | 2 | ||||
-rw-r--r-- | core/fxcodec/jbig2/JBig2_PddProc.h | 4 |
8 files changed, 54 insertions, 53 deletions
diff --git a/core/fxcodec/jbig2/JBig2_Context.cpp b/core/fxcodec/jbig2/JBig2_Context.cpp index 30e4aab78c..3d823c7b19 100644 --- a/core/fxcodec/jbig2/JBig2_Context.cpp +++ b/core/fxcodec/jbig2/JBig2_Context.cpp @@ -23,7 +23,7 @@ #include "core/fxcodec/jbig2/JBig2_PddProc.h" #include "core/fxcodec/jbig2/JBig2_SddProc.h" #include "core/fxcodec/jbig2/JBig2_TrdProc.h" -#include "core/fxcrt/ifx_pauseindicator.h" +#include "core/fxcrt/pauseindicator_iface.h" #include "third_party/base/ptr_util.h" namespace { @@ -70,7 +70,7 @@ CJBig2_Context::CJBig2_Context(const RetainPtr<CPDF_StreamAcc>& pGlobalStream, CJBig2_Context::~CJBig2_Context() {} -int32_t CJBig2_Context::decodeSequential(IFX_PauseIndicator* pPause) { +int32_t CJBig2_Context::decodeSequential(PauseIndicatorIface* pPause) { int32_t nRet; if (m_pStream->getByteLeft() <= 0) return JBIG2_END_OF_FILE; @@ -119,7 +119,7 @@ int32_t CJBig2_Context::decodeSequential(IFX_PauseIndicator* pPause) { return JBIG2_SUCCESS; } -int32_t CJBig2_Context::decodeRandomFirstPage(IFX_PauseIndicator* pPause) { +int32_t CJBig2_Context::decodeRandomFirstPage(PauseIndicatorIface* pPause) { int32_t nRet; while (m_pStream->getByteLeft() > JBIG2_MIN_SEGMENT_SIZE) { auto pSegment = pdfium::MakeUnique<CJBig2_Segment>(); @@ -141,7 +141,7 @@ int32_t CJBig2_Context::decodeRandomFirstPage(IFX_PauseIndicator* pPause) { return decodeRandom(pPause); } -int32_t CJBig2_Context::decodeRandom(IFX_PauseIndicator* pPause) { +int32_t CJBig2_Context::decodeRandom(PauseIndicatorIface* pPause) { for (; m_nSegmentDecoded < m_SegmentList.size(); ++m_nSegmentDecoded) { int32_t nRet = parseSegmentData(m_SegmentList[m_nSegmentDecoded].get(), pPause); @@ -164,7 +164,7 @@ int32_t CJBig2_Context::getFirstPage(uint8_t* pBuf, int32_t width, int32_t height, int32_t stride, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { int32_t nRet = 0; if (m_pGlobalContext) { nRet = m_pGlobalContext->decodeSequential(pPause); @@ -184,7 +184,7 @@ int32_t CJBig2_Context::getFirstPage(uint8_t* pBuf, return Continue(pPause); } -int32_t CJBig2_Context::Continue(IFX_PauseIndicator* pPause) { +int32_t CJBig2_Context::Continue(PauseIndicatorIface* pPause) { m_ProcessingStatus = FXCODEC_STATUS_DECODE_READY; int32_t nRet = 0; if (m_PauseStep <= 2) { @@ -317,7 +317,7 @@ int32_t CJBig2_Context::parseSegmentHeader(CJBig2_Segment* pSegment) { } int32_t CJBig2_Context::parseSegmentData(CJBig2_Segment* pSegment, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { int32_t ret = ProcessingParseSegmentData(pSegment, pPause); while (m_ProcessingStatus == FXCODEC_STATUS_DECODE_TOBECONTINUE && m_pStream->getByteLeft() > 0) { @@ -326,8 +326,9 @@ int32_t CJBig2_Context::parseSegmentData(CJBig2_Segment* pSegment, return ret; } -int32_t CJBig2_Context::ProcessingParseSegmentData(CJBig2_Segment* pSegment, - IFX_PauseIndicator* pPause) { +int32_t CJBig2_Context::ProcessingParseSegmentData( + CJBig2_Segment* pSegment, + PauseIndicatorIface* pPause) { switch (pSegment->m_cFlags.s.type) { case 0: return parseSymbolDict(pSegment); @@ -926,7 +927,7 @@ int32_t CJBig2_Context::parseTextRegion(CJBig2_Segment* pSegment) { } int32_t CJBig2_Context::parsePatternDict(CJBig2_Segment* pSegment, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { uint8_t cFlags; auto pPDD = pdfium::MakeUnique<CJBig2_PDDProc>(); if (m_pStream->read1Byte(&cFlags) != 0 || @@ -965,7 +966,7 @@ int32_t CJBig2_Context::parsePatternDict(CJBig2_Segment* pSegment, } int32_t CJBig2_Context::parseHalftoneRegion(CJBig2_Segment* pSegment, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { uint8_t cFlags; JBig2RegionInfo ri; auto pHRD = pdfium::MakeUnique<CJBig2_HTRDProc>(); @@ -1043,7 +1044,7 @@ int32_t CJBig2_Context::parseHalftoneRegion(CJBig2_Segment* pSegment, } int32_t CJBig2_Context::parseGenericRegion(CJBig2_Segment* pSegment, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { if (!m_pGRD) { auto pGRD = pdfium::MakeUnique<CJBig2_GRDProc>(); uint8_t cFlags; diff --git a/core/fxcodec/jbig2/JBig2_Context.h b/core/fxcodec/jbig2/JBig2_Context.h index f86aa2ea1d..9a47682a38 100644 --- a/core/fxcodec/jbig2/JBig2_Context.h +++ b/core/fxcodec/jbig2/JBig2_Context.h @@ -21,7 +21,7 @@ class CJBig2_ArithDecoder; class CJBig2_GRDProc; class CPDF_StreamAcc; -class IFX_PauseIndicator; +class PauseIndicatorIface; // Cache is keyed by the ObjNum of a stream and an index within the stream. using CJBig2_CacheKey = std::pair<uint32_t, uint32_t>; @@ -49,15 +49,15 @@ class CJBig2_Context { int32_t width, int32_t height, int32_t stride, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); - int32_t Continue(IFX_PauseIndicator* pPause); + int32_t Continue(PauseIndicatorIface* pPause); FXCODEC_STATUS GetProcessingStatus() const { return m_ProcessingStatus; } private: - int32_t decodeSequential(IFX_PauseIndicator* pPause); - int32_t decodeRandomFirstPage(IFX_PauseIndicator* pPause); - int32_t decodeRandom(IFX_PauseIndicator* pPause); + int32_t decodeSequential(PauseIndicatorIface* pPause); + int32_t decodeRandomFirstPage(PauseIndicatorIface* pPause); + int32_t decodeRandom(PauseIndicatorIface* pPause); CJBig2_Segment* findSegmentByNumber(uint32_t dwNumber); CJBig2_Segment* findReferredSegmentByTypeAndIndex(CJBig2_Segment* pSegment, @@ -66,17 +66,17 @@ class CJBig2_Context { int32_t parseSegmentHeader(CJBig2_Segment* pSegment); int32_t parseSegmentData(CJBig2_Segment* pSegment, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); int32_t ProcessingParseSegmentData(CJBig2_Segment* pSegment, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); int32_t parseSymbolDict(CJBig2_Segment* pSegment); int32_t parseTextRegion(CJBig2_Segment* pSegment); int32_t parsePatternDict(CJBig2_Segment* pSegment, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); int32_t parseHalftoneRegion(CJBig2_Segment* pSegment, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); int32_t parseGenericRegion(CJBig2_Segment* pSegment, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); int32_t parseGenericRefinementRegion(CJBig2_Segment* pSegment); int32_t parseTable(CJBig2_Segment* pSegment); int32_t parseRegionInfo(JBig2RegionInfo* pRI); diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.cpp b/core/fxcodec/jbig2/JBig2_GrdProc.cpp index e308ae35ee..faa4865bc4 100644 --- a/core/fxcodec/jbig2/JBig2_GrdProc.cpp +++ b/core/fxcodec/jbig2/JBig2_GrdProc.cpp @@ -13,7 +13,7 @@ #include "core/fxcodec/jbig2/JBig2_ArithDecoder.h" #include "core/fxcodec/jbig2/JBig2_BitStream.h" #include "core/fxcodec/jbig2/JBig2_Image.h" -#include "core/fxcrt/ifx_pauseindicator.h" +#include "core/fxcrt/pauseindicator_iface.h" #include "third_party/base/ptr_util.h" CJBig2_GRDProc::CJBig2_GRDProc() @@ -641,7 +641,7 @@ FXCODEC_STATUS CJBig2_GRDProc::Start_decode_Arith( std::unique_ptr<CJBig2_Image>* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { if (GBW == 0 || GBW > JBIG2_MAX_IMAGE_SIZE || GBH == 0 || GBH > JBIG2_MAX_IMAGE_SIZE) { m_ProssiveStatus = FXCODEC_STATUS_DECODE_FINISH; @@ -666,7 +666,7 @@ FXCODEC_STATUS CJBig2_GRDProc::Start_decode_Arith( } FXCODEC_STATUS CJBig2_GRDProc::decode_Arith( - IFX_PauseIndicator* pPause, + PauseIndicatorIface* pPause, CJBig2_ArithDecoder* pArithDecoder) { int iline = m_loopIndex; if (GBTEMPLATE == 0) { @@ -734,7 +734,7 @@ FXCODEC_STATUS CJBig2_GRDProc::Start_decode_MMR( } FXCODEC_STATUS CJBig2_GRDProc::Continue_decode( - IFX_PauseIndicator* pPause, + PauseIndicatorIface* pPause, CJBig2_ArithDecoder* pArithDecoder) { if (m_ProssiveStatus != FXCODEC_STATUS_DECODE_TOBECONTINUE) return m_ProssiveStatus; @@ -750,7 +750,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template0_opt3( CJBig2_Image* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { if (!m_pLine) m_pLine = pImage->data(); int32_t nStride = pImage->stride(); @@ -853,7 +853,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template0_unopt( CJBig2_Image* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { for (; m_loopIndex < GBH; m_loopIndex++) { if (TPGDON) { if (pArithDecoder->IsComplete()) @@ -911,7 +911,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template1_opt3( CJBig2_Image* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { if (!m_pLine) m_pLine = pImage->data(); int32_t nStride = pImage->stride(); @@ -1012,7 +1012,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template1_unopt( CJBig2_Image* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { for (uint32_t h = 0; h < GBH; h++) { if (TPGDON) { if (pArithDecoder->IsComplete()) @@ -1066,7 +1066,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template2_opt3( CJBig2_Image* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { if (!m_pLine) m_pLine = pImage->data(); int32_t nStride = pImage->stride(); @@ -1167,7 +1167,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template2_unopt( CJBig2_Image* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { for (; m_loopIndex < GBH; m_loopIndex++) { if (TPGDON) { if (pArithDecoder->IsComplete()) @@ -1221,7 +1221,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template3_opt3( CJBig2_Image* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { if (!m_pLine) m_pLine = pImage->data(); int32_t nStride = pImage->stride(); @@ -1308,7 +1308,7 @@ FXCODEC_STATUS CJBig2_GRDProc::decode_Arith_Template3_unopt( CJBig2_Image* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { for (; m_loopIndex < GBH; m_loopIndex++) { if (TPGDON) { if (pArithDecoder->IsComplete()) diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.h b/core/fxcodec/jbig2/JBig2_GrdProc.h index 79992adcba..a8329f9a00 100644 --- a/core/fxcodec/jbig2/JBig2_GrdProc.h +++ b/core/fxcodec/jbig2/JBig2_GrdProc.h @@ -17,7 +17,7 @@ class CJBig2_ArithDecoder; class CJBig2_BitStream; class CJBig2_Image; -class IFX_PauseIndicator; +class PauseIndicatorIface; struct JBig2ArithCtx; class CJBig2_GRDProc { @@ -31,10 +31,10 @@ class CJBig2_GRDProc { FXCODEC_STATUS Start_decode_Arith(std::unique_ptr<CJBig2_Image>* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); FXCODEC_STATUS Start_decode_MMR(std::unique_ptr<CJBig2_Image>* pImage, CJBig2_BitStream* pStream); - FXCODEC_STATUS Continue_decode(IFX_PauseIndicator* pPause, + FXCODEC_STATUS Continue_decode(PauseIndicatorIface* pPause, CJBig2_ArithDecoder* pArithDecoder); FX_RECT GetReplaceRect() const { return m_ReplaceRect; } @@ -52,44 +52,44 @@ class CJBig2_GRDProc { bool UseTemplate1Opt3() const; bool UseTemplate23Opt3() const; - FXCODEC_STATUS decode_Arith(IFX_PauseIndicator* pPause, + FXCODEC_STATUS decode_Arith(PauseIndicatorIface* pPause, CJBig2_ArithDecoder* pArithDecoder); FXCODEC_STATUS decode_Arith_Template0_opt3(CJBig2_Image* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); FXCODEC_STATUS decode_Arith_Template0_unopt( CJBig2_Image* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); FXCODEC_STATUS decode_Arith_Template1_opt3(CJBig2_Image* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); FXCODEC_STATUS decode_Arith_Template1_unopt( CJBig2_Image* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); FXCODEC_STATUS decode_Arith_Template2_opt3(CJBig2_Image* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); FXCODEC_STATUS decode_Arith_Template2_unopt( CJBig2_Image* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); FXCODEC_STATUS decode_Arith_Template3_opt3(CJBig2_Image* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); FXCODEC_STATUS decode_Arith_Template3_unopt( CJBig2_Image* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); std::unique_ptr<CJBig2_Image> decode_Arith_Template0_opt3( CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext); diff --git a/core/fxcodec/jbig2/JBig2_HtrdProc.cpp b/core/fxcodec/jbig2/JBig2_HtrdProc.cpp index bd1d92f2be..ec692cacce 100644 --- a/core/fxcodec/jbig2/JBig2_HtrdProc.cpp +++ b/core/fxcodec/jbig2/JBig2_HtrdProc.cpp @@ -17,7 +17,7 @@ std::unique_ptr<CJBig2_Image> CJBig2_HTRDProc::decode_Arith( CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { std::unique_ptr<CJBig2_Image> HSKIP; if (HENABLESKIP == 1) { HSKIP = pdfium::MakeUnique<CJBig2_Image>(HGW, HGH); diff --git a/core/fxcodec/jbig2/JBig2_HtrdProc.h b/core/fxcodec/jbig2/JBig2_HtrdProc.h index ed7cdbf2b5..b61a08c036 100644 --- a/core/fxcodec/jbig2/JBig2_HtrdProc.h +++ b/core/fxcodec/jbig2/JBig2_HtrdProc.h @@ -15,14 +15,14 @@ class CJBig2_ArithDecoder; class CJBig2_BitStream; -class IFX_PauseIndicator; +class PauseIndicatorIface; struct JBig2ArithCtx; class CJBig2_HTRDProc { public: std::unique_ptr<CJBig2_Image> decode_Arith(CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); std::unique_ptr<CJBig2_Image> decode_MMR(CJBig2_BitStream* pStream); diff --git a/core/fxcodec/jbig2/JBig2_PddProc.cpp b/core/fxcodec/jbig2/JBig2_PddProc.cpp index ee891cc002..68963dc584 100644 --- a/core/fxcodec/jbig2/JBig2_PddProc.cpp +++ b/core/fxcodec/jbig2/JBig2_PddProc.cpp @@ -16,7 +16,7 @@ std::unique_ptr<CJBig2_PatternDict> CJBig2_PDDProc::decode_Arith( CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { uint32_t GRAY; std::unique_ptr<CJBig2_Image> BHDC; auto pDict = pdfium::MakeUnique<CJBig2_PatternDict>(GRAYMAX + 1); diff --git a/core/fxcodec/jbig2/JBig2_PddProc.h b/core/fxcodec/jbig2/JBig2_PddProc.h index 938da1b209..0d6776cc1c 100644 --- a/core/fxcodec/jbig2/JBig2_PddProc.h +++ b/core/fxcodec/jbig2/JBig2_PddProc.h @@ -14,7 +14,7 @@ class CJBig2_ArithDecoder; class CJBig2_BitStream; class CJBig2_PatternDict; -class IFX_PauseIndicator; +class PauseIndicatorIface; struct JBig2ArithCtx; class CJBig2_PDDProc { @@ -22,7 +22,7 @@ class CJBig2_PDDProc { std::unique_ptr<CJBig2_PatternDict> decode_Arith( CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); std::unique_ptr<CJBig2_PatternDict> decode_MMR(CJBig2_BitStream* pStream); |