diff options
Diffstat (limited to 'core')
58 files changed, 157 insertions, 155 deletions
diff --git a/core/fpdfapi/page/cpdf_contentparser.cpp b/core/fpdfapi/page/cpdf_contentparser.cpp index 93151af305..08923f38b6 100644 --- a/core/fpdfapi/page/cpdf_contentparser.cpp +++ b/core/fpdfapi/page/cpdf_contentparser.cpp @@ -17,7 +17,7 @@ #include "core/fpdfapi/parser/cpdf_stream.h" #include "core/fpdfapi/parser/cpdf_stream_acc.h" #include "core/fxcrt/fx_safe_types.h" -#include "core/fxcrt/ifx_pauseindicator.h" +#include "core/fxcrt/pauseindicator_iface.h" #include "third_party/base/ptr_util.h" #define PARSE_STEP_LIMIT 100 @@ -109,7 +109,7 @@ CPDF_ContentParser::CPDF_ContentParser(CPDF_Form* pForm, CPDF_ContentParser::~CPDF_ContentParser() {} -bool CPDF_ContentParser::Continue(IFX_PauseIndicator* pPause) { +bool CPDF_ContentParser::Continue(PauseIndicatorIface* pPause) { if (m_bIsDone) return false; diff --git a/core/fpdfapi/page/cpdf_contentparser.h b/core/fpdfapi/page/cpdf_contentparser.h index c65da6da55..b66783775b 100644 --- a/core/fpdfapi/page/cpdf_contentparser.h +++ b/core/fpdfapi/page/cpdf_contentparser.h @@ -37,7 +37,7 @@ class CPDF_ContentParser { return m_pParser ? m_pParser->GetCurStates() : nullptr; } // Returns whether to continue or not. - bool Continue(IFX_PauseIndicator* pPause); + bool Continue(PauseIndicatorIface* pPause); private: enum InternalStage { diff --git a/core/fpdfapi/page/cpdf_image.cpp b/core/fpdfapi/page/cpdf_image.cpp index b74de62250..68432bf1fe 100644 --- a/core/fpdfapi/page/cpdf_image.cpp +++ b/core/fpdfapi/page/cpdf_image.cpp @@ -370,7 +370,7 @@ bool CPDF_Image::StartLoadDIBSource(CPDF_Dictionary* pFormResource, return false; } -bool CPDF_Image::Continue(IFX_PauseIndicator* pPause) { +bool CPDF_Image::Continue(PauseIndicatorIface* pPause) { RetainPtr<CPDF_DIBSource> pSource = m_pDIBSource.As<CPDF_DIBSource>(); CPDF_DIBSource::LoadState ret = pSource->ContinueLoadDIBSource(pPause); if (ret == CPDF_DIBSource::LoadState::kContinue) diff --git a/core/fpdfapi/page/cpdf_image.h b/core/fpdfapi/page/cpdf_image.h index 43011f8822..73ea92c666 100644 --- a/core/fpdfapi/page/cpdf_image.h +++ b/core/fpdfapi/page/cpdf_image.h @@ -19,7 +19,7 @@ class CFX_DIBSource; class CFX_DIBitmap; class CPDF_Document; class CPDF_Page; -class IFX_PauseIndicator; +class PauseIndicatorIface; class IFX_SeekableReadStream; class CPDF_Image : public Retainable { @@ -57,7 +57,7 @@ class CPDF_Image : public Retainable { bool bLoadMask = false); // Returns whether to Continue() or not. - bool Continue(IFX_PauseIndicator* pPause); + bool Continue(PauseIndicatorIface* pPause); RetainPtr<CFX_DIBSource> DetachBitmap(); RetainPtr<CFX_DIBSource> DetachMask(); diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.cpp b/core/fpdfapi/page/cpdf_pageobjectholder.cpp index 51a67e8a15..9413ffbfae 100644 --- a/core/fpdfapi/page/cpdf_pageobjectholder.cpp +++ b/core/fpdfapi/page/cpdf_pageobjectholder.cpp @@ -33,7 +33,7 @@ bool CPDF_PageObjectHolder::IsPage() const { return false; } -void CPDF_PageObjectHolder::ContinueParse(IFX_PauseIndicator* pPause) { +void CPDF_PageObjectHolder::ContinueParse(PauseIndicatorIface* pPause) { if (!m_pParser) return; diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.h b/core/fpdfapi/page/cpdf_pageobjectholder.h index f649ef7b62..aac907763c 100644 --- a/core/fpdfapi/page/cpdf_pageobjectholder.h +++ b/core/fpdfapi/page/cpdf_pageobjectholder.h @@ -17,7 +17,7 @@ #include "core/fxcrt/fx_system.h" #include "core/fxcrt/unowned_ptr.h" -class IFX_PauseIndicator; +class PauseIndicatorIface; class CPDF_Dictionary; class CPDF_Stream; class CPDF_Document; @@ -49,7 +49,7 @@ class CPDF_PageObjectHolder { virtual bool IsPage() const; - void ContinueParse(IFX_PauseIndicator* pPause); + void ContinueParse(PauseIndicatorIface* pPause); bool IsParsed() const { return m_ParseState == CONTENT_PARSED; } CPDF_PageObjectList* GetPageObjectList() { return &m_PageObjectList; } diff --git a/core/fpdfapi/render/cpdf_dibsource.cpp b/core/fpdfapi/render/cpdf_dibsource.cpp index 8dd53e4d1e..d552842756 100644 --- a/core/fpdfapi/render/cpdf_dibsource.cpp +++ b/core/fpdfapi/render/cpdf_dibsource.cpp @@ -301,7 +301,7 @@ CPDF_DIBSource::LoadState CPDF_DIBSource::StartLoadDIBSource( } CPDF_DIBSource::LoadState CPDF_DIBSource::ContinueLoadDIBSource( - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { if (m_Status == LoadState::kContinue) return ContinueLoadMaskDIB(pPause); @@ -697,7 +697,7 @@ CPDF_DIBSource::LoadState CPDF_DIBSource::StartLoadMask() { } CPDF_DIBSource::LoadState CPDF_DIBSource::ContinueLoadMaskDIB( - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { if (!m_pMask) return LoadState::kSuccess; @@ -1087,7 +1087,7 @@ const uint8_t* CPDF_DIBSource::GetScanline(int line) const { } bool CPDF_DIBSource::SkipToScanline(int line, - IFX_PauseIndicator* pPause) const { + PauseIndicatorIface* pPause) const { return m_pDecoder && m_pDecoder->SkipToScanline(line, pPause); } diff --git a/core/fpdfapi/render/cpdf_dibsource.h b/core/fpdfapi/render/cpdf_dibsource.h index e66a45e303..534baabf16 100644 --- a/core/fpdfapi/render/cpdf_dibsource.h +++ b/core/fpdfapi/render/cpdf_dibsource.h @@ -51,7 +51,7 @@ class CPDF_DIBSource : public CFX_DIBSource { bool Load(CPDF_Document* pDoc, const CPDF_Stream* pStream); // CFX_DIBSource - bool SkipToScanline(int line, IFX_PauseIndicator* pPause) const override; + bool SkipToScanline(int line, PauseIndicatorIface* pPause) const override; uint8_t* GetBuffer() const override; const uint8_t* GetScanline(int line) const override; void DownSampleScanline(int line, @@ -73,7 +73,7 @@ class CPDF_DIBSource : public CFX_DIBSource { bool bStdCS = false, uint32_t GroupFamily = 0, bool bLoadMask = false); - LoadState ContinueLoadDIBSource(IFX_PauseIndicator* pPause); + LoadState ContinueLoadDIBSource(PauseIndicatorIface* pPause); RetainPtr<CPDF_DIBSource> DetachMask(); bool IsJBigImage() const; @@ -84,7 +84,7 @@ class CPDF_DIBSource : public CFX_DIBSource { LoadState StartLoadMask(); LoadState StartLoadMaskDIB(); bool ContinueToLoadMask(); - LoadState ContinueLoadMaskDIB(IFX_PauseIndicator* pPause); + LoadState ContinueLoadMaskDIB(PauseIndicatorIface* pPause); bool LoadColorInfo(const CPDF_Dictionary* pFormResources, const CPDF_Dictionary* pPageResources); DIB_COMP_DATA* GetDecodeAndMaskArray(bool* bDefaultDecode, bool* bColorKey); diff --git a/core/fpdfapi/render/cpdf_imagecacheentry.cpp b/core/fpdfapi/render/cpdf_imagecacheentry.cpp index f0b0c33750..65c9a6b9a4 100644 --- a/core/fpdfapi/render/cpdf_imagecacheentry.cpp +++ b/core/fpdfapi/render/cpdf_imagecacheentry.cpp @@ -82,7 +82,7 @@ CPDF_DIBSource::LoadState CPDF_ImageCacheEntry::StartGetCachedBitmap( return CPDF_DIBSource::LoadState::kFail; } -bool CPDF_ImageCacheEntry::Continue(IFX_PauseIndicator* pPause, +bool CPDF_ImageCacheEntry::Continue(PauseIndicatorIface* pPause, CPDF_RenderStatus* pRenderStatus) { CPDF_DIBSource::LoadState ret = m_pCurBitmap.As<CPDF_DIBSource>()->ContinueLoadDIBSource(pPause); diff --git a/core/fpdfapi/render/cpdf_imagecacheentry.h b/core/fpdfapi/render/cpdf_imagecacheentry.h index dfeeddf408..b397370eea 100644 --- a/core/fpdfapi/render/cpdf_imagecacheentry.h +++ b/core/fpdfapi/render/cpdf_imagecacheentry.h @@ -19,7 +19,7 @@ class CPDF_Dictionary; class CPDF_Document; class CPDF_Image; class CPDF_RenderStatus; -class IFX_PauseIndicator; +class PauseIndicatorIface; class CPDF_ImageCacheEntry { public: @@ -41,7 +41,7 @@ class CPDF_ImageCacheEntry { CPDF_RenderStatus* pRenderStatus); // Returns whether to Continue() or not. - bool Continue(IFX_PauseIndicator* pPause, CPDF_RenderStatus* pRenderStatus); + bool Continue(PauseIndicatorIface* pPause, CPDF_RenderStatus* pRenderStatus); RetainPtr<CFX_DIBSource> DetachBitmap(); RetainPtr<CFX_DIBSource> DetachMask(); diff --git a/core/fpdfapi/render/cpdf_imageloader.cpp b/core/fpdfapi/render/cpdf_imageloader.cpp index 08aa5f1784..c8f9013029 100644 --- a/core/fpdfapi/render/cpdf_imageloader.cpp +++ b/core/fpdfapi/render/cpdf_imageloader.cpp @@ -43,7 +43,7 @@ bool CPDF_ImageLoader::Start(const CPDF_ImageObject* pImage, return ret; } -bool CPDF_ImageLoader::Continue(IFX_PauseIndicator* pPause, +bool CPDF_ImageLoader::Continue(PauseIndicatorIface* pPause, CPDF_RenderStatus* pRenderStatus) { bool ret = m_pCache ? m_pCache->Continue(pPause, pRenderStatus) : m_pImageObject->GetImage()->Continue(pPause); diff --git a/core/fpdfapi/render/cpdf_imageloader.h b/core/fpdfapi/render/cpdf_imageloader.h index 497ef156da..a4f313fb69 100644 --- a/core/fpdfapi/render/cpdf_imageloader.h +++ b/core/fpdfapi/render/cpdf_imageloader.h @@ -16,7 +16,7 @@ class CPDF_ImageObject; class CPDF_PageRenderCache; class CPDF_RenderStatus; -class IFX_PauseIndicator; +class PauseIndicatorIface; class CPDF_ImageLoader { public: @@ -29,7 +29,7 @@ class CPDF_ImageLoader { uint32_t GroupFamily, bool bLoadMask, CPDF_RenderStatus* pRenderStatus); - bool Continue(IFX_PauseIndicator* pPause, CPDF_RenderStatus* pRenderStatus); + bool Continue(PauseIndicatorIface* pPause, CPDF_RenderStatus* pRenderStatus); RetainPtr<CFX_DIBSource> m_pBitmap; RetainPtr<CFX_DIBSource> m_pMask; diff --git a/core/fpdfapi/render/cpdf_imagerenderer.cpp b/core/fpdfapi/render/cpdf_imagerenderer.cpp index 1351597279..3844f69895 100644 --- a/core/fpdfapi/render/cpdf_imagerenderer.cpp +++ b/core/fpdfapi/render/cpdf_imagerenderer.cpp @@ -516,7 +516,7 @@ bool CPDF_ImageRenderer::StartBitmapAlpha() { return false; } -bool CPDF_ImageRenderer::Continue(IFX_PauseIndicator* pPause) { +bool CPDF_ImageRenderer::Continue(PauseIndicatorIface* pPause) { if (m_Status == 2) { if (m_pTransformer->Continue(pPause)) return true; diff --git a/core/fpdfapi/render/cpdf_imagerenderer.h b/core/fpdfapi/render/cpdf_imagerenderer.h index a5d9ba769b..e6c6d0c1b8 100644 --- a/core/fpdfapi/render/cpdf_imagerenderer.h +++ b/core/fpdfapi/render/cpdf_imagerenderer.h @@ -43,7 +43,7 @@ class CPDF_ImageRenderer { bool bStdCS, int blendType); - bool Continue(IFX_PauseIndicator* pPause); + bool Continue(PauseIndicatorIface* pPause); bool GetResult() const { return m_Result; } private: diff --git a/core/fpdfapi/render/cpdf_pagerendercache.cpp b/core/fpdfapi/render/cpdf_pagerendercache.cpp index 781f18f0e0..a929cb69c7 100644 --- a/core/fpdfapi/render/cpdf_pagerendercache.cpp +++ b/core/fpdfapi/render/cpdf_pagerendercache.cpp @@ -110,7 +110,7 @@ bool CPDF_PageRenderCache::StartGetCachedBitmap( return false; } -bool CPDF_PageRenderCache::Continue(IFX_PauseIndicator* pPause, +bool CPDF_PageRenderCache::Continue(PauseIndicatorIface* pPause, CPDF_RenderStatus* pRenderStatus) { bool ret = m_pCurImageCacheEntry->Continue(pPause, pRenderStatus); if (ret) diff --git a/core/fpdfapi/render/cpdf_pagerendercache.h b/core/fpdfapi/render/cpdf_pagerendercache.h index 58f0bb7e32..fe94bed722 100644 --- a/core/fpdfapi/render/cpdf_pagerendercache.h +++ b/core/fpdfapi/render/cpdf_pagerendercache.h @@ -19,7 +19,7 @@ class CPDF_ImageCacheEntry; class CPDF_Page; class CPDF_RenderStatus; class CPDF_Stream; -class IFX_PauseIndicator; +class PauseIndicatorIface; class CPDF_PageRenderCache { public: @@ -41,7 +41,7 @@ class CPDF_PageRenderCache { bool bLoadMask, CPDF_RenderStatus* pRenderStatus); - bool Continue(IFX_PauseIndicator* pPause, CPDF_RenderStatus* pRenderStatus); + bool Continue(PauseIndicatorIface* pPause, CPDF_RenderStatus* pRenderStatus); private: void ClearImageCacheEntry(CPDF_Stream* pStream); diff --git a/core/fpdfapi/render/cpdf_progressiverenderer.cpp b/core/fpdfapi/render/cpdf_progressiverenderer.cpp index e509a25440..922e3fd60d 100644 --- a/core/fpdfapi/render/cpdf_progressiverenderer.cpp +++ b/core/fpdfapi/render/cpdf_progressiverenderer.cpp @@ -13,7 +13,7 @@ #include "core/fpdfapi/render/cpdf_pagerendercache.h" #include "core/fpdfapi/render/cpdf_renderoptions.h" #include "core/fpdfapi/render/cpdf_renderstatus.h" -#include "core/fxcrt/ifx_pauseindicator.h" +#include "core/fxcrt/pauseindicator_iface.h" #include "core/fxge/cfx_renderdevice.h" #include "third_party/base/ptr_util.h" @@ -35,7 +35,7 @@ CPDF_ProgressiveRenderer::~CPDF_ProgressiveRenderer() { } } -void CPDF_ProgressiveRenderer::Start(IFX_PauseIndicator* pPause) { +void CPDF_ProgressiveRenderer::Start(PauseIndicatorIface* pPause) { if (!m_pContext || !m_pDevice || m_Status != Ready) { m_Status = Failed; return; @@ -44,7 +44,7 @@ void CPDF_ProgressiveRenderer::Start(IFX_PauseIndicator* pPause) { Continue(pPause); } -void CPDF_ProgressiveRenderer::Continue(IFX_PauseIndicator* pPause) { +void CPDF_ProgressiveRenderer::Continue(PauseIndicatorIface* pPause) { while (m_Status == ToBeContinued) { if (!m_pCurrentLayer) { if (m_LayerIndex >= m_pContext->CountLayers()) { diff --git a/core/fpdfapi/render/cpdf_progressiverenderer.h b/core/fpdfapi/render/cpdf_progressiverenderer.h index ffd63a9aaf..5703b42918 100644 --- a/core/fpdfapi/render/cpdf_progressiverenderer.h +++ b/core/fpdfapi/render/cpdf_progressiverenderer.h @@ -17,7 +17,7 @@ class CPDF_RenderOptions; class CPDF_RenderStatus; class CFX_RenderDevice; -class IFX_PauseIndicator; +class PauseIndicatorIface; class CPDF_ProgressiveRenderer { public: @@ -39,8 +39,8 @@ class CPDF_ProgressiveRenderer { ~CPDF_ProgressiveRenderer(); Status GetStatus() const { return m_Status; } - void Start(IFX_PauseIndicator* pPause); - void Continue(IFX_PauseIndicator* pPause); + void Start(PauseIndicatorIface* pPause); + void Continue(PauseIndicatorIface* pPause); private: // Maximum page objects to render before checking for pause. diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp index 0a01ae0ccf..b93c6f5b02 100644 --- a/core/fpdfapi/render/cpdf_renderstatus.cpp +++ b/core/fpdfapi/render/cpdf_renderstatus.cpp @@ -1124,7 +1124,7 @@ void CPDF_RenderStatus::RenderSingleObject(CPDF_PageObject* pObj, bool CPDF_RenderStatus::ContinueSingleObject(CPDF_PageObject* pObj, const CFX_Matrix* pObj2Device, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { if (m_pImageRenderer) { if (m_pImageRenderer->Continue(pPause)) return true; diff --git a/core/fpdfapi/render/cpdf_renderstatus.h b/core/fpdfapi/render/cpdf_renderstatus.h index 8008092766..44afa10f19 100644 --- a/core/fpdfapi/render/cpdf_renderstatus.h +++ b/core/fpdfapi/render/cpdf_renderstatus.h @@ -61,7 +61,7 @@ class CPDF_RenderStatus { void RenderSingleObject(CPDF_PageObject* pObj, const CFX_Matrix* pObj2Device); bool ContinueSingleObject(CPDF_PageObject* pObj, const CFX_Matrix* pObj2Device, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); void ProcessClipPath(const CPDF_ClipPath& ClipPath, const CFX_Matrix* pObj2Device); diff --git a/core/fxcodec/codec/ccodec_jbig2module.h b/core/fxcodec/codec/ccodec_jbig2module.h index 4fa4a81776..306b079846 100644 --- a/core/fxcodec/codec/ccodec_jbig2module.h +++ b/core/fxcodec/codec/ccodec_jbig2module.h @@ -15,7 +15,7 @@ class CJBig2_Context; class CJBig2_Image; class CPDF_StreamAcc; -class IFX_PauseIndicator; +class PauseIndicatorIface; class JBig2_DocumentContext; class CCodec_Jbig2Context { @@ -46,9 +46,9 @@ class CCodec_Jbig2Module { const RetainPtr<CPDF_StreamAcc>& global_stream, uint8_t* dest_buf, uint32_t dest_pitch, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); FXCODEC_STATUS ContinueDecode(CCodec_Jbig2Context* pJbig2Context, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); private: FXCODEC_STATUS Decode(CCodec_Jbig2Context* pJbig2Context, int result); diff --git a/core/fxcodec/codec/ccodec_scanlinedecoder.cpp b/core/fxcodec/codec/ccodec_scanlinedecoder.cpp index 55b9a2a87d..ee0d12a247 100644 --- a/core/fxcodec/codec/ccodec_scanlinedecoder.cpp +++ b/core/fxcodec/codec/ccodec_scanlinedecoder.cpp @@ -6,7 +6,7 @@ #include "core/fxcodec/codec/ccodec_scanlinedecoder.h" -#include "core/fxcrt/ifx_pauseindicator.h" +#include "core/fxcrt/pauseindicator_iface.h" CCodec_ScanlineDecoder::CCodec_ScanlineDecoder() : CCodec_ScanlineDecoder(0, 0, 0, 0, 0, 0, 0) {} @@ -49,7 +49,7 @@ const uint8_t* CCodec_ScanlineDecoder::GetScanline(int line) { } bool CCodec_ScanlineDecoder::SkipToScanline(int line, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { if (m_NextLine == line || m_NextLine == line + 1) return false; diff --git a/core/fxcodec/codec/ccodec_scanlinedecoder.h b/core/fxcodec/codec/ccodec_scanlinedecoder.h index 05d5eab92b..a6e6d3d969 100644 --- a/core/fxcodec/codec/ccodec_scanlinedecoder.h +++ b/core/fxcodec/codec/ccodec_scanlinedecoder.h @@ -9,7 +9,7 @@ #include "core/fxcrt/fx_system.h" -class IFX_PauseIndicator; +class PauseIndicatorIface; class CCodec_ScanlineDecoder { public: @@ -24,7 +24,7 @@ class CCodec_ScanlineDecoder { virtual ~CCodec_ScanlineDecoder(); const uint8_t* GetScanline(int line); - bool SkipToScanline(int line, IFX_PauseIndicator* pPause); + bool SkipToScanline(int line, PauseIndicatorIface* pPause); int GetWidth() { return m_OutputWidth; } int GetHeight() { return m_OutputHeight; } diff --git a/core/fxcodec/codec/fx_codec_jbig.cpp b/core/fxcodec/codec/fx_codec_jbig.cpp index 543aeebc87..51cae38441 100644 --- a/core/fxcodec/codec/fx_codec_jbig.cpp +++ b/core/fxcodec/codec/fx_codec_jbig.cpp @@ -48,7 +48,7 @@ FXCODEC_STATUS CCodec_Jbig2Module::StartDecode( const RetainPtr<CPDF_StreamAcc>& global_stream, uint8_t* dest_buf, uint32_t dest_pitch, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { if (!pJbig2Context) return FXCODEC_STATUS_ERR_PARAMS; @@ -71,7 +71,7 @@ FXCODEC_STATUS CCodec_Jbig2Module::StartDecode( FXCODEC_STATUS CCodec_Jbig2Module::ContinueDecode( CCodec_Jbig2Context* pJbig2Context, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { int ret = pJbig2Context->m_pContext->Continue(pPause); return Decode(pJbig2Context, ret); } 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); diff --git a/core/fxcrt/cfx_fileaccess_posix.cpp b/core/fxcrt/cfx_fileaccess_posix.cpp index 2f85670c59..4aab6fef46 100644 --- a/core/fxcrt/cfx_fileaccess_posix.cpp +++ b/core/fxcrt/cfx_fileaccess_posix.cpp @@ -41,7 +41,7 @@ void GetFileMode(uint32_t dwModes, int32_t& nFlags, int32_t& nMasks) { } // namespace // static -std::unique_ptr<IFX_FileAccess> IFX_FileAccess::Create() { +std::unique_ptr<FileAccessIface> FileAccessIface::Create() { return pdfium::MakeUnique<CFX_FileAccess_Posix>(); } diff --git a/core/fxcrt/cfx_fileaccess_posix.h b/core/fxcrt/cfx_fileaccess_posix.h index efa25ebb4c..84fc81bd98 100644 --- a/core/fxcrt/cfx_fileaccess_posix.h +++ b/core/fxcrt/cfx_fileaccess_posix.h @@ -7,17 +7,17 @@ #ifndef CORE_FXCRT_CFX_FILEACCESS_POSIX_H_ #define CORE_FXCRT_CFX_FILEACCESS_POSIX_H_ -#include "core/fxcrt/ifx_fileaccess.h" +#include "core/fxcrt/fileaccess_iface.h" #if _FX_PLATFORM_ == _FX_PLATFORM_LINUX_ || \ _FX_PLATFORM_ == _FX_PLATFORM_APPLE_ || \ _FX_PLATFORM_ == _FX_PLATFORM_ANDROID_ -class CFX_FileAccess_Posix : public IFX_FileAccess { +class CFX_FileAccess_Posix : public FileAccessIface { public: CFX_FileAccess_Posix(); ~CFX_FileAccess_Posix() override; - // IFX_FileAccess: + // FileAccessIface: bool Open(const ByteStringView& fileName, uint32_t dwMode) override; bool Open(const WideStringView& fileName, uint32_t dwMode) override; void Close() override; diff --git a/core/fxcrt/cfx_fileaccess_windows.cpp b/core/fxcrt/cfx_fileaccess_windows.cpp index 1ac4496edb..f416bb6b77 100644 --- a/core/fxcrt/cfx_fileaccess_windows.cpp +++ b/core/fxcrt/cfx_fileaccess_windows.cpp @@ -32,7 +32,7 @@ void GetFileMode(uint32_t dwMode, } // namespace // static -std::unique_ptr<IFX_FileAccess> IFX_FileAccess::Create() { +std::unique_ptr<FileAccessIface> FileAccessIface::Create() { return pdfium::MakeUnique<CFX_FileAccess_Windows>(); } diff --git a/core/fxcrt/cfx_fileaccess_windows.h b/core/fxcrt/cfx_fileaccess_windows.h index 6fd07d553c..451462bbca 100644 --- a/core/fxcrt/cfx_fileaccess_windows.h +++ b/core/fxcrt/cfx_fileaccess_windows.h @@ -7,15 +7,15 @@ #ifndef CORE_FXCRT_CFX_FILEACCESS_WINDOWS_H_ #define CORE_FXCRT_CFX_FILEACCESS_WINDOWS_H_ -#include "core/fxcrt/ifx_fileaccess.h" +#include "core/fxcrt/fileaccess_iface.h" #if _FX_PLATFORM_ == _FX_PLATFORM_WINDOWS_ -class CFX_FileAccess_Windows : public IFX_FileAccess { +class CFX_FileAccess_Windows : public FileAccessIface { public: CFX_FileAccess_Windows(); ~CFX_FileAccess_Windows() override; - // IFX_FileAccess + // FileAccessIface bool Open(const ByteStringView& fileName, uint32_t dwMode) override; bool Open(const WideStringView& fileName, uint32_t dwMode) override; void Close() override; diff --git a/core/fxcrt/ifx_fileaccess.h b/core/fxcrt/fileaccess_iface.h index 9bfe2b4e63..c438f9ec47 100644 --- a/core/fxcrt/ifx_fileaccess.h +++ b/core/fxcrt/fileaccess_iface.h @@ -4,8 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#ifndef CORE_FXCRT_IFX_FILEACCESS_H_ -#define CORE_FXCRT_IFX_FILEACCESS_H_ +#ifndef CORE_FXCRT_FILEACCESS_IFACE_H_ +#define CORE_FXCRT_FILEACCESS_IFACE_H_ #include <algorithm> #include <memory> @@ -14,10 +14,10 @@ #include "core/fxcrt/fx_stream.h" #include "core/fxcrt/fx_string.h" -class IFX_FileAccess { +class FileAccessIface { public: - static std::unique_ptr<IFX_FileAccess> Create(); - virtual ~IFX_FileAccess() {} + static std::unique_ptr<FileAccessIface> Create(); + virtual ~FileAccessIface() {} virtual bool Open(const ByteStringView& fileName, uint32_t dwMode) = 0; virtual bool Open(const WideStringView& fileName, uint32_t dwMode) = 0; @@ -35,4 +35,4 @@ class IFX_FileAccess { virtual bool Truncate(FX_FILESIZE szFile) = 0; }; -#endif // CORE_FXCRT_IFX_FILEACCESS_H_ +#endif // CORE_FXCRT_FILEACCESS_IFACE_H_ diff --git a/core/fxcrt/fx_stream.cpp b/core/fxcrt/fx_stream.cpp index bd75ad6ec7..337cbb325c 100644 --- a/core/fxcrt/fx_stream.cpp +++ b/core/fxcrt/fx_stream.cpp @@ -11,8 +11,8 @@ #include <utility> #include <vector> +#include "core/fxcrt/fileaccess_iface.h" #include "core/fxcrt/fx_safe_types.h" -#include "core/fxcrt/ifx_fileaccess.h" #include "third_party/base/ptr_util.h" namespace { @@ -40,11 +40,11 @@ class CFX_CRTFileStream final : public IFX_SeekableStream { bool Flush() override { return m_pFile->Flush(); } private: - explicit CFX_CRTFileStream(std::unique_ptr<IFX_FileAccess> pFA) + explicit CFX_CRTFileStream(std::unique_ptr<FileAccessIface> pFA) : m_pFile(std::move(pFA)) {} ~CFX_CRTFileStream() override {} - std::unique_ptr<IFX_FileAccess> m_pFile; + std::unique_ptr<FileAccessIface> m_pFile; }; } // namespace @@ -53,7 +53,7 @@ class CFX_CRTFileStream final : public IFX_SeekableStream { RetainPtr<IFX_SeekableStream> IFX_SeekableStream::CreateFromFilename( const char* filename, uint32_t dwModes) { - std::unique_ptr<IFX_FileAccess> pFA = IFX_FileAccess::Create(); + std::unique_ptr<FileAccessIface> pFA = FileAccessIface::Create(); if (!pFA->Open(filename, dwModes)) return nullptr; return pdfium::MakeRetain<CFX_CRTFileStream>(std::move(pFA)); @@ -63,7 +63,7 @@ RetainPtr<IFX_SeekableStream> IFX_SeekableStream::CreateFromFilename( RetainPtr<IFX_SeekableStream> IFX_SeekableStream::CreateFromFilename( const wchar_t* filename, uint32_t dwModes) { - std::unique_ptr<IFX_FileAccess> pFA = IFX_FileAccess::Create(); + std::unique_ptr<FileAccessIface> pFA = FileAccessIface::Create(); if (!pFA->Open(filename, dwModes)) return nullptr; return pdfium::MakeRetain<CFX_CRTFileStream>(std::move(pFA)); diff --git a/core/fxcrt/ifx_locale.h b/core/fxcrt/locale_iface.h index 5918e7a183..0adfb19682 100644 --- a/core/fxcrt/ifx_locale.h +++ b/core/fxcrt/locale_iface.h @@ -4,8 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#ifndef CORE_FXCRT_IFX_LOCALE_H_ -#define CORE_FXCRT_IFX_LOCALE_H_ +#ifndef CORE_FXCRT_LOCALE_IFACE_H_ +#define CORE_FXCRT_LOCALE_IFACE_H_ #include "core/fxcrt/cfx_datetime.h" #include "core/fxcrt/fx_string.h" @@ -54,9 +54,9 @@ enum FX_DATETIMETYPE { FX_DATETIMETYPE_TimeDate, }; -class IFX_Locale { +class LocaleIface { public: - virtual ~IFX_Locale() {} + virtual ~LocaleIface() {} virtual WideString GetName() const = 0; virtual WideString GetNumbericSymbol(FX_LOCALENUMSYMBOL eType) const = 0; @@ -73,4 +73,4 @@ class IFX_Locale { virtual WideString GetNumPattern(FX_LOCALENUMSUBCATEGORY eType) const = 0; }; -#endif // CORE_FXCRT_IFX_LOCALE_H_ +#endif // CORE_FXCRT_LOCALE_IFACE_H_ diff --git a/core/fxcrt/ifx_pauseindicator.h b/core/fxcrt/pauseindicator_iface.h index 79c6016706..c12b02e427 100644 --- a/core/fxcrt/ifx_pauseindicator.h +++ b/core/fxcrt/pauseindicator_iface.h @@ -4,13 +4,13 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#ifndef CORE_FXCRT_IFX_PAUSEINDICATOR_H_ -#define CORE_FXCRT_IFX_PAUSEINDICATOR_H_ +#ifndef CORE_FXCRT_PAUSEINDICATOR_IFACE_H_ +#define CORE_FXCRT_PAUSEINDICATOR_IFACE_H_ -class IFX_PauseIndicator { +class PauseIndicatorIface { public: - virtual ~IFX_PauseIndicator() {} + virtual ~PauseIndicatorIface() {} virtual bool NeedToPauseNow() = 0; }; -#endif // CORE_FXCRT_IFX_PAUSEINDICATOR_H_ +#endif // CORE_FXCRT_PAUSEINDICATOR_IFACE_H_ diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp index 922f39efcd..9d8d8fa0a1 100644 --- a/core/fxge/agg/fx_agg_driver.cpp +++ b/core/fxge/agg/fx_agg_driver.cpp @@ -1562,7 +1562,7 @@ bool CFX_AggDeviceDriver::StartDIBits( } bool CFX_AggDeviceDriver::ContinueDIBits(CFX_ImageRenderer* pHandle, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { return m_pBitmap->GetBuffer() ? pHandle->Continue(pPause) : true; } diff --git a/core/fxge/agg/fx_agg_driver.h b/core/fxge/agg/fx_agg_driver.h index 41b97da2fb..3f4481c507 100644 --- a/core/fxge/agg/fx_agg_driver.h +++ b/core/fxge/agg/fx_agg_driver.h @@ -90,7 +90,7 @@ class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver { std::unique_ptr<CFX_ImageRenderer>* handle, int blend_type) override; bool ContinueDIBits(CFX_ImageRenderer* handle, - IFX_PauseIndicator* pPause) override; + PauseIndicatorIface* pPause) override; bool DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont, diff --git a/core/fxge/cfx_renderdevice.cpp b/core/fxge/cfx_renderdevice.cpp index 919a7a98a7..af148eec01 100644 --- a/core/fxge/cfx_renderdevice.cpp +++ b/core/fxge/cfx_renderdevice.cpp @@ -844,7 +844,7 @@ bool CFX_RenderDevice::StartDIBitsWithBlend( } bool CFX_RenderDevice::ContinueDIBits(CFX_ImageRenderer* handle, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { return m_pDeviceDriver->ContinueDIBits(handle, pPause); } diff --git a/core/fxge/cfx_renderdevice.h b/core/fxge/cfx_renderdevice.h index d3ebed41c4..925ec26108 100644 --- a/core/fxge/cfx_renderdevice.h +++ b/core/fxge/cfx_renderdevice.h @@ -17,7 +17,7 @@ class CFX_DIBitmap; class CFX_Font; class CFX_GraphStateData; class CFX_ImageRenderer; -class IFX_PauseIndicator; +class PauseIndicatorIface; class IFX_RenderDeviceDriver; #define FXDC_DEVICE_CLASS 1 @@ -205,7 +205,7 @@ class CFX_RenderDevice { uint32_t flags, std::unique_ptr<CFX_ImageRenderer>* handle, int blend_type); - bool ContinueDIBits(CFX_ImageRenderer* handle, IFX_PauseIndicator* pPause); + bool ContinueDIBits(CFX_ImageRenderer* handle, PauseIndicatorIface* pPause); bool DrawNormalText(int nChars, const FXTEXT_CHARPOS* pCharPos, diff --git a/core/fxge/dib/cfx_dibsource.cpp b/core/fxge/dib/cfx_dibsource.cpp index 104b3caf96..86bec23c67 100644 --- a/core/fxge/dib/cfx_dibsource.cpp +++ b/core/fxge/dib/cfx_dibsource.cpp @@ -726,7 +726,8 @@ uint8_t* CFX_DIBSource::GetBuffer() const { return nullptr; } -bool CFX_DIBSource::SkipToScanline(int line, IFX_PauseIndicator* pPause) const { +bool CFX_DIBSource::SkipToScanline(int line, + PauseIndicatorIface* pPause) const { return false; } diff --git a/core/fxge/dib/cfx_dibsource.h b/core/fxge/dib/cfx_dibsource.h index 02cae5d0f2..0e7fb27dde 100644 --- a/core/fxge/dib/cfx_dibsource.h +++ b/core/fxge/dib/cfx_dibsource.h @@ -27,7 +27,7 @@ enum FXDIB_Channel { class CFX_ClipRgn; class CFX_DIBitmap; -class IFX_PauseIndicator; +class PauseIndicatorIface; class CFX_DIBSource : public Retainable { public: @@ -35,7 +35,7 @@ class CFX_DIBSource : public Retainable { virtual uint8_t* GetBuffer() const; virtual const uint8_t* GetScanline(int line) const = 0; - virtual bool SkipToScanline(int line, IFX_PauseIndicator* pPause) const; + virtual bool SkipToScanline(int line, PauseIndicatorIface* pPause) const; virtual void DownSampleScanline(int line, uint8_t* dest_scan, int dest_bpp, diff --git a/core/fxge/dib/cfx_imagerenderer.cpp b/core/fxge/dib/cfx_imagerenderer.cpp index 658d363c89..a196068a2e 100644 --- a/core/fxge/dib/cfx_imagerenderer.cpp +++ b/core/fxge/dib/cfx_imagerenderer.cpp @@ -87,7 +87,7 @@ CFX_ImageRenderer::CFX_ImageRenderer(const RetainPtr<CFX_DIBitmap>& pDevice, CFX_ImageRenderer::~CFX_ImageRenderer() {} -bool CFX_ImageRenderer::Continue(IFX_PauseIndicator* pPause) { +bool CFX_ImageRenderer::Continue(PauseIndicatorIface* pPause) { if (m_Status == 1) return m_Stretcher->Continue(pPause); if (m_Status != 2) diff --git a/core/fxge/dib/cfx_imagerenderer.h b/core/fxge/dib/cfx_imagerenderer.h index 18a56e2782..14eaf56ff8 100644 --- a/core/fxge/dib/cfx_imagerenderer.h +++ b/core/fxge/dib/cfx_imagerenderer.h @@ -33,7 +33,7 @@ class CFX_ImageRenderer { bool bRgbByteOrder); ~CFX_ImageRenderer(); - bool Continue(IFX_PauseIndicator* pPause); + bool Continue(PauseIndicatorIface* pPause); private: const RetainPtr<CFX_DIBitmap> m_pDevice; diff --git a/core/fxge/dib/cfx_imagestretcher.cpp b/core/fxge/dib/cfx_imagestretcher.cpp index 03518c688e..af93b266c7 100644 --- a/core/fxge/dib/cfx_imagestretcher.cpp +++ b/core/fxge/dib/cfx_imagestretcher.cpp @@ -124,7 +124,7 @@ bool CFX_ImageStretcher::Start() { return StartStretch(); } -bool CFX_ImageStretcher::Continue(IFX_PauseIndicator* pPause) { +bool CFX_ImageStretcher::Continue(PauseIndicatorIface* pPause) { if (m_Flags & FXDIB_DOWNSAMPLE) return ContinueQuickStretch(pPause); return ContinueStretch(pPause); @@ -142,7 +142,7 @@ bool CFX_ImageStretcher::StartStretch() { return true; } -bool CFX_ImageStretcher::ContinueStretch(IFX_PauseIndicator* pPause) { +bool CFX_ImageStretcher::ContinueStretch(PauseIndicatorIface* pPause) { return m_pStretchEngine && m_pStretchEngine->Continue(pPause); } @@ -171,7 +171,7 @@ bool CFX_ImageStretcher::StartQuickStretch() { return true; } -bool CFX_ImageStretcher::ContinueQuickStretch(IFX_PauseIndicator* pPause) { +bool CFX_ImageStretcher::ContinueQuickStretch(PauseIndicatorIface* pPause) { if (!m_pScanline) return false; diff --git a/core/fxge/dib/cfx_imagestretcher.h b/core/fxge/dib/cfx_imagestretcher.h index 2ecb2a0492..e2ed4e990b 100644 --- a/core/fxge/dib/cfx_imagestretcher.h +++ b/core/fxge/dib/cfx_imagestretcher.h @@ -17,7 +17,7 @@ #include "core/fxge/fx_dib.h" class CFX_DIBSource; -class IFX_PauseIndicator; +class PauseIndicatorIface; class CFX_ImageStretcher { public: @@ -30,15 +30,15 @@ class CFX_ImageStretcher { ~CFX_ImageStretcher(); bool Start(); - bool Continue(IFX_PauseIndicator* pPause); + bool Continue(PauseIndicatorIface* pPause); RetainPtr<CFX_DIBSource> source() { return m_pSource; } private: bool StartQuickStretch(); bool StartStretch(); - bool ContinueQuickStretch(IFX_PauseIndicator* pPause); - bool ContinueStretch(IFX_PauseIndicator* pPause); + bool ContinueQuickStretch(PauseIndicatorIface* pPause); + bool ContinueStretch(PauseIndicatorIface* pPause); UnownedPtr<IFX_ScanlineComposer> const m_pDest; RetainPtr<CFX_DIBSource> m_pSource; diff --git a/core/fxge/dib/cfx_imagetransformer.cpp b/core/fxge/dib/cfx_imagetransformer.cpp index e514153acf..6f3ab86996 100644 --- a/core/fxge/dib/cfx_imagetransformer.cpp +++ b/core/fxge/dib/cfx_imagetransformer.cpp @@ -265,7 +265,7 @@ CFX_ImageTransformer::CFX_ImageTransformer(const RetainPtr<CFX_DIBSource>& pSrc, CFX_ImageTransformer::~CFX_ImageTransformer() {} -bool CFX_ImageTransformer::Continue(IFX_PauseIndicator* pPause) { +bool CFX_ImageTransformer::Continue(PauseIndicatorIface* pPause) { if (m_Status == 1) { if (m_Stretcher->Continue(pPause)) return true; diff --git a/core/fxge/dib/cfx_imagetransformer.h b/core/fxge/dib/cfx_imagetransformer.h index d13ce3f130..97dd61f9e1 100644 --- a/core/fxge/dib/cfx_imagetransformer.h +++ b/core/fxge/dib/cfx_imagetransformer.h @@ -26,7 +26,7 @@ class CFX_ImageTransformer { const FX_RECT* pClip); ~CFX_ImageTransformer(); - bool Continue(IFX_PauseIndicator* pPause); + bool Continue(PauseIndicatorIface* pPause); const FX_RECT& result() const { return m_result; } RetainPtr<CFX_DIBitmap> DetachBitmap(); diff --git a/core/fxge/dib/cstretchengine.cpp b/core/fxge/dib/cstretchengine.cpp index 6803959730..cb7ffa0166 100644 --- a/core/fxge/dib/cstretchengine.cpp +++ b/core/fxge/dib/cstretchengine.cpp @@ -9,7 +9,7 @@ #include <algorithm> #include <utility> -#include "core/fxcrt/ifx_pauseindicator.h" +#include "core/fxcrt/pauseindicator_iface.h" #include "core/fxge/dib/cfx_dibitmap.h" #include "core/fxge/dib/cfx_dibsource.h" #include "core/fxge/dib/ifx_scanlinecomposer.h" @@ -311,7 +311,7 @@ CStretchEngine::CStretchEngine(IFX_ScanlineComposer* pDestBitmap, CStretchEngine::~CStretchEngine() {} -bool CStretchEngine::Continue(IFX_PauseIndicator* pPause) { +bool CStretchEngine::Continue(PauseIndicatorIface* pPause) { while (m_State == 1) { if (ContinueStretchHorz(pPause)) return true; @@ -348,7 +348,7 @@ bool CStretchEngine::StartStretchHorz() { return true; } -bool CStretchEngine::ContinueStretchHorz(IFX_PauseIndicator* pPause) { +bool CStretchEngine::ContinueStretchHorz(PauseIndicatorIface* pPause) { if (!m_DestWidth) return false; if (m_pSource->SkipToScanline(m_CurRow, pPause)) diff --git a/core/fxge/dib/cstretchengine.h b/core/fxge/dib/cstretchengine.h index 8ce8351304..6f0d4dc54d 100644 --- a/core/fxge/dib/cstretchengine.h +++ b/core/fxge/dib/cstretchengine.h @@ -14,7 +14,7 @@ #include "core/fxcrt/unowned_ptr.h" #include "core/fxge/fx_dib.h" -class IFX_PauseIndicator; +class PauseIndicatorIface; class IFX_ScanlineComposer; class CStretchEngine { @@ -28,10 +28,10 @@ class CStretchEngine { int flags); ~CStretchEngine(); - bool Continue(IFX_PauseIndicator* pPause); + bool Continue(PauseIndicatorIface* pPause); bool StartStretchHorz(); - bool ContinueStretchHorz(IFX_PauseIndicator* pPause); + bool ContinueStretchHorz(PauseIndicatorIface* pPause); void StretchVert(); class CWeightTable { diff --git a/core/fxge/ifx_renderdevicedriver.cpp b/core/fxge/ifx_renderdevicedriver.cpp index eae773d75c..ff8d8fde8d 100644 --- a/core/fxge/ifx_renderdevicedriver.cpp +++ b/core/fxge/ifx_renderdevicedriver.cpp @@ -57,7 +57,7 @@ RetainPtr<CFX_DIBitmap> IFX_RenderDeviceDriver::GetBackDrop() { } bool IFX_RenderDeviceDriver::ContinueDIBits(CFX_ImageRenderer* handle, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { return false; } diff --git a/core/fxge/ifx_renderdevicedriver.h b/core/fxge/ifx_renderdevicedriver.h index e9498bdf22..90c94da506 100644 --- a/core/fxge/ifx_renderdevicedriver.h +++ b/core/fxge/ifx_renderdevicedriver.h @@ -22,7 +22,7 @@ class CFX_Matrix; class CFX_PathData; class CPDF_ShadingPattern; class FXTEXT_CHARPOS; -class IFX_PauseIndicator; +class PauseIndicatorIface; struct FX_RECT; class IFX_RenderDeviceDriver { @@ -87,7 +87,7 @@ class IFX_RenderDeviceDriver { std::unique_ptr<CFX_ImageRenderer>* handle, int blend_type) = 0; virtual bool ContinueDIBits(CFX_ImageRenderer* handle, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); virtual bool DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont, diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index 1885cef083..190ad9e80c 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -2395,7 +2395,7 @@ bool CFX_SkiaDeviceDriver::StartDIBits( } bool CFX_SkiaDeviceDriver::ContinueDIBits(CFX_ImageRenderer* handle, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { #ifdef _SKIA_SUPPORT_ m_pCache->FlushForDraw(); return false; diff --git a/core/fxge/skia/fx_skia_device.h b/core/fxge/skia/fx_skia_device.h index c2e6c013d9..4e60191f74 100644 --- a/core/fxge/skia/fx_skia_device.h +++ b/core/fxge/skia/fx_skia_device.h @@ -121,7 +121,7 @@ class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver { int blend_type) override; bool ContinueDIBits(CFX_ImageRenderer* handle, - IFX_PauseIndicator* pPause) override; + PauseIndicatorIface* pPause) override; bool DrawBitsWithMask(const RetainPtr<CFX_DIBSource>& pBitmap, const RetainPtr<CFX_DIBSource>& pMask, |