From a32145f1f16b7b02110bf359208f587d7d486551 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 6 Mar 2018 18:53:05 +0000 Subject: Rename core/fxcrt IFX files to Iface This CL renames the 3 IFX files in core/fxcrt to Iface instead. Change-Id: I7cee6836650b71bc5c5729a8147fda62f0910fe3 Reviewed-on: https://pdfium-review.googlesource.com/27970 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- core/fpdfapi/page/cpdf_contentparser.cpp | 4 +- core/fpdfapi/page/cpdf_contentparser.h | 2 +- core/fpdfapi/page/cpdf_image.cpp | 2 +- core/fpdfapi/page/cpdf_image.h | 4 +- core/fpdfapi/page/cpdf_pageobjectholder.cpp | 2 +- core/fpdfapi/page/cpdf_pageobjectholder.h | 4 +- core/fpdfapi/render/cpdf_dibsource.cpp | 6 +- core/fpdfapi/render/cpdf_dibsource.h | 6 +- core/fpdfapi/render/cpdf_imagecacheentry.cpp | 2 +- core/fpdfapi/render/cpdf_imagecacheentry.h | 4 +- core/fpdfapi/render/cpdf_imageloader.cpp | 2 +- core/fpdfapi/render/cpdf_imageloader.h | 4 +- core/fpdfapi/render/cpdf_imagerenderer.cpp | 2 +- core/fpdfapi/render/cpdf_imagerenderer.h | 2 +- core/fpdfapi/render/cpdf_pagerendercache.cpp | 2 +- core/fpdfapi/render/cpdf_pagerendercache.h | 4 +- core/fpdfapi/render/cpdf_progressiverenderer.cpp | 6 +- core/fpdfapi/render/cpdf_progressiverenderer.h | 6 +- core/fpdfapi/render/cpdf_renderstatus.cpp | 2 +- core/fpdfapi/render/cpdf_renderstatus.h | 2 +- core/fxcodec/codec/ccodec_jbig2module.h | 6 +- core/fxcodec/codec/ccodec_scanlinedecoder.cpp | 4 +- core/fxcodec/codec/ccodec_scanlinedecoder.h | 4 +- core/fxcodec/codec/fx_codec_jbig.cpp | 4 +- core/fxcodec/jbig2/JBig2_Context.cpp | 25 ++++---- core/fxcodec/jbig2/JBig2_Context.h | 22 +++---- core/fxcodec/jbig2/JBig2_GrdProc.cpp | 24 ++++---- core/fxcodec/jbig2/JBig2_GrdProc.h | 24 ++++---- core/fxcodec/jbig2/JBig2_HtrdProc.cpp | 2 +- core/fxcodec/jbig2/JBig2_HtrdProc.h | 4 +- core/fxcodec/jbig2/JBig2_PddProc.cpp | 2 +- core/fxcodec/jbig2/JBig2_PddProc.h | 4 +- core/fxcrt/cfx_fileaccess_posix.cpp | 2 +- core/fxcrt/cfx_fileaccess_posix.h | 6 +- core/fxcrt/cfx_fileaccess_windows.cpp | 2 +- core/fxcrt/cfx_fileaccess_windows.h | 6 +- core/fxcrt/fileaccess_iface.h | 38 ++++++++++++ core/fxcrt/fx_stream.cpp | 10 ++-- core/fxcrt/ifx_fileaccess.h | 38 ------------ core/fxcrt/ifx_locale.h | 76 ------------------------ core/fxcrt/ifx_pauseindicator.h | 16 ----- core/fxcrt/locale_iface.h | 76 ++++++++++++++++++++++++ core/fxcrt/pauseindicator_iface.h | 16 +++++ core/fxge/agg/fx_agg_driver.cpp | 2 +- core/fxge/agg/fx_agg_driver.h | 2 +- core/fxge/cfx_renderdevice.cpp | 2 +- core/fxge/cfx_renderdevice.h | 4 +- core/fxge/dib/cfx_dibsource.cpp | 3 +- core/fxge/dib/cfx_dibsource.h | 4 +- core/fxge/dib/cfx_imagerenderer.cpp | 2 +- core/fxge/dib/cfx_imagerenderer.h | 2 +- core/fxge/dib/cfx_imagestretcher.cpp | 6 +- core/fxge/dib/cfx_imagestretcher.h | 8 +-- core/fxge/dib/cfx_imagetransformer.cpp | 2 +- core/fxge/dib/cfx_imagetransformer.h | 2 +- core/fxge/dib/cstretchengine.cpp | 6 +- core/fxge/dib/cstretchengine.h | 6 +- core/fxge/ifx_renderdevicedriver.cpp | 2 +- core/fxge/ifx_renderdevicedriver.h | 4 +- core/fxge/skia/fx_skia_device.cpp | 2 +- core/fxge/skia/fx_skia_device.h | 2 +- 61 files changed, 271 insertions(+), 269 deletions(-) create mode 100644 core/fxcrt/fileaccess_iface.h delete mode 100644 core/fxcrt/ifx_fileaccess.h delete mode 100644 core/fxcrt/ifx_locale.h delete mode 100644 core/fxcrt/ifx_pauseindicator.h create mode 100644 core/fxcrt/locale_iface.h create mode 100644 core/fxcrt/pauseindicator_iface.h (limited to 'core') 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 pSource = m_pDIBSource.As(); 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 DetachBitmap(); RetainPtr 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 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()->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 DetachBitmap(); RetainPtr 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 m_pBitmap; RetainPtr 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& 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& 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& 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(); @@ -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(); 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(); @@ -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(); 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; @@ -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* 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* pImage, CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); FXCODEC_STATUS Start_decode_MMR(std::unique_ptr* 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 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_HTRDProc::decode_Arith( CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { std::unique_ptr HSKIP; if (HENABLESKIP == 1) { HSKIP = pdfium::MakeUnique(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 decode_Arith(CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); std::unique_ptr 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_PDDProc::decode_Arith( CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause) { + PauseIndicatorIface* pPause) { uint32_t GRAY; std::unique_ptr BHDC; auto pDict = pdfium::MakeUnique(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 decode_Arith( CJBig2_ArithDecoder* pArithDecoder, JBig2ArithCtx* gbContext, - IFX_PauseIndicator* pPause); + PauseIndicatorIface* pPause); std::unique_ptr 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::Create() { +std::unique_ptr FileAccessIface::Create() { return pdfium::MakeUnique(); } 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::Create() { +std::unique_ptr FileAccessIface::Create() { return pdfium::MakeUnique(); } 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/fileaccess_iface.h b/core/fxcrt/fileaccess_iface.h new file mode 100644 index 0000000000..c438f9ec47 --- /dev/null +++ b/core/fxcrt/fileaccess_iface.h @@ -0,0 +1,38 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_FILEACCESS_IFACE_H_ +#define CORE_FXCRT_FILEACCESS_IFACE_H_ + +#include +#include + +#include "core/fxcrt/fx_safe_types.h" +#include "core/fxcrt/fx_stream.h" +#include "core/fxcrt/fx_string.h" + +class FileAccessIface { + public: + static std::unique_ptr Create(); + virtual ~FileAccessIface() {} + + virtual bool Open(const ByteStringView& fileName, uint32_t dwMode) = 0; + virtual bool Open(const WideStringView& fileName, uint32_t dwMode) = 0; + virtual void Close() = 0; + virtual FX_FILESIZE GetSize() const = 0; + virtual FX_FILESIZE GetPosition() const = 0; + virtual FX_FILESIZE SetPosition(FX_FILESIZE pos) = 0; + virtual size_t Read(void* pBuffer, size_t szBuffer) = 0; + virtual size_t Write(const void* pBuffer, size_t szBuffer) = 0; + virtual size_t ReadPos(void* pBuffer, size_t szBuffer, FX_FILESIZE pos) = 0; + virtual size_t WritePos(const void* pBuffer, + size_t szBuffer, + FX_FILESIZE pos) = 0; + virtual bool Flush() = 0; + virtual bool Truncate(FX_FILESIZE szFile) = 0; +}; + +#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 #include +#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 pFA) + explicit CFX_CRTFileStream(std::unique_ptr pFA) : m_pFile(std::move(pFA)) {} ~CFX_CRTFileStream() override {} - std::unique_ptr m_pFile; + std::unique_ptr m_pFile; }; } // namespace @@ -53,7 +53,7 @@ class CFX_CRTFileStream final : public IFX_SeekableStream { RetainPtr IFX_SeekableStream::CreateFromFilename( const char* filename, uint32_t dwModes) { - std::unique_ptr pFA = IFX_FileAccess::Create(); + std::unique_ptr pFA = FileAccessIface::Create(); if (!pFA->Open(filename, dwModes)) return nullptr; return pdfium::MakeRetain(std::move(pFA)); @@ -63,7 +63,7 @@ RetainPtr IFX_SeekableStream::CreateFromFilename( RetainPtr IFX_SeekableStream::CreateFromFilename( const wchar_t* filename, uint32_t dwModes) { - std::unique_ptr pFA = IFX_FileAccess::Create(); + std::unique_ptr pFA = FileAccessIface::Create(); if (!pFA->Open(filename, dwModes)) return nullptr; return pdfium::MakeRetain(std::move(pFA)); diff --git a/core/fxcrt/ifx_fileaccess.h b/core/fxcrt/ifx_fileaccess.h deleted file mode 100644 index 9bfe2b4e63..0000000000 --- a/core/fxcrt/ifx_fileaccess.h +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCRT_IFX_FILEACCESS_H_ -#define CORE_FXCRT_IFX_FILEACCESS_H_ - -#include -#include - -#include "core/fxcrt/fx_safe_types.h" -#include "core/fxcrt/fx_stream.h" -#include "core/fxcrt/fx_string.h" - -class IFX_FileAccess { - public: - static std::unique_ptr Create(); - virtual ~IFX_FileAccess() {} - - virtual bool Open(const ByteStringView& fileName, uint32_t dwMode) = 0; - virtual bool Open(const WideStringView& fileName, uint32_t dwMode) = 0; - virtual void Close() = 0; - virtual FX_FILESIZE GetSize() const = 0; - virtual FX_FILESIZE GetPosition() const = 0; - virtual FX_FILESIZE SetPosition(FX_FILESIZE pos) = 0; - virtual size_t Read(void* pBuffer, size_t szBuffer) = 0; - virtual size_t Write(const void* pBuffer, size_t szBuffer) = 0; - virtual size_t ReadPos(void* pBuffer, size_t szBuffer, FX_FILESIZE pos) = 0; - virtual size_t WritePos(const void* pBuffer, - size_t szBuffer, - FX_FILESIZE pos) = 0; - virtual bool Flush() = 0; - virtual bool Truncate(FX_FILESIZE szFile) = 0; -}; - -#endif // CORE_FXCRT_IFX_FILEACCESS_H_ diff --git a/core/fxcrt/ifx_locale.h b/core/fxcrt/ifx_locale.h deleted file mode 100644 index 5918e7a183..0000000000 --- a/core/fxcrt/ifx_locale.h +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCRT_IFX_LOCALE_H_ -#define CORE_FXCRT_IFX_LOCALE_H_ - -#include "core/fxcrt/cfx_datetime.h" -#include "core/fxcrt/fx_string.h" - -enum FX_LOCALENUMSYMBOL { - FX_LOCALENUMSYMBOL_Decimal, - FX_LOCALENUMSYMBOL_Grouping, - FX_LOCALENUMSYMBOL_Percent, - FX_LOCALENUMSYMBOL_Minus, - FX_LOCALENUMSYMBOL_Zero, - FX_LOCALENUMSYMBOL_CurrencySymbol, - FX_LOCALENUMSYMBOL_CurrencyName, -}; - -enum FX_LOCALEDATETIMESUBCATEGORY { - FX_LOCALEDATETIMESUBCATEGORY_Default, - FX_LOCALEDATETIMESUBCATEGORY_Short, - FX_LOCALEDATETIMESUBCATEGORY_Medium, - FX_LOCALEDATETIMESUBCATEGORY_Full, - FX_LOCALEDATETIMESUBCATEGORY_Long, -}; - -enum FX_LOCALENUMSUBCATEGORY { - FX_LOCALENUMPATTERN_Percent, - FX_LOCALENUMPATTERN_Currency, - FX_LOCALENUMPATTERN_Decimal, - FX_LOCALENUMPATTERN_Integer, -}; - -enum FX_LOCALECATEGORY { - FX_LOCALECATEGORY_Unknown, - FX_LOCALECATEGORY_Date, - FX_LOCALECATEGORY_Time, - FX_LOCALECATEGORY_DateTime, - FX_LOCALECATEGORY_Num, - FX_LOCALECATEGORY_Text, - FX_LOCALECATEGORY_Zero, - FX_LOCALECATEGORY_Null, -}; - -enum FX_DATETIMETYPE { - FX_DATETIMETYPE_Unknown, - FX_DATETIMETYPE_Date, - FX_DATETIMETYPE_Time, - FX_DATETIMETYPE_DateTime, - FX_DATETIMETYPE_TimeDate, -}; - -class IFX_Locale { - public: - virtual ~IFX_Locale() {} - - virtual WideString GetName() const = 0; - virtual WideString GetNumbericSymbol(FX_LOCALENUMSYMBOL eType) const = 0; - virtual WideString GetDateTimeSymbols() const = 0; - virtual WideString GetMonthName(int32_t nMonth, bool bAbbr) const = 0; - virtual WideString GetDayName(int32_t nWeek, bool bAbbr) const = 0; - virtual WideString GetMeridiemName(bool bAM) const = 0; - virtual FX_TIMEZONE GetTimeZone() const = 0; - virtual WideString GetEraName(bool bAD) const = 0; - virtual WideString GetDatePattern( - FX_LOCALEDATETIMESUBCATEGORY eType) const = 0; - virtual WideString GetTimePattern( - FX_LOCALEDATETIMESUBCATEGORY eType) const = 0; - virtual WideString GetNumPattern(FX_LOCALENUMSUBCATEGORY eType) const = 0; -}; - -#endif // CORE_FXCRT_IFX_LOCALE_H_ diff --git a/core/fxcrt/ifx_pauseindicator.h b/core/fxcrt/ifx_pauseindicator.h deleted file mode 100644 index 79c6016706..0000000000 --- a/core/fxcrt/ifx_pauseindicator.h +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2017 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCRT_IFX_PAUSEINDICATOR_H_ -#define CORE_FXCRT_IFX_PAUSEINDICATOR_H_ - -class IFX_PauseIndicator { - public: - virtual ~IFX_PauseIndicator() {} - virtual bool NeedToPauseNow() = 0; -}; - -#endif // CORE_FXCRT_IFX_PAUSEINDICATOR_H_ diff --git a/core/fxcrt/locale_iface.h b/core/fxcrt/locale_iface.h new file mode 100644 index 0000000000..0adfb19682 --- /dev/null +++ b/core/fxcrt/locale_iface.h @@ -0,0 +1,76 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_LOCALE_IFACE_H_ +#define CORE_FXCRT_LOCALE_IFACE_H_ + +#include "core/fxcrt/cfx_datetime.h" +#include "core/fxcrt/fx_string.h" + +enum FX_LOCALENUMSYMBOL { + FX_LOCALENUMSYMBOL_Decimal, + FX_LOCALENUMSYMBOL_Grouping, + FX_LOCALENUMSYMBOL_Percent, + FX_LOCALENUMSYMBOL_Minus, + FX_LOCALENUMSYMBOL_Zero, + FX_LOCALENUMSYMBOL_CurrencySymbol, + FX_LOCALENUMSYMBOL_CurrencyName, +}; + +enum FX_LOCALEDATETIMESUBCATEGORY { + FX_LOCALEDATETIMESUBCATEGORY_Default, + FX_LOCALEDATETIMESUBCATEGORY_Short, + FX_LOCALEDATETIMESUBCATEGORY_Medium, + FX_LOCALEDATETIMESUBCATEGORY_Full, + FX_LOCALEDATETIMESUBCATEGORY_Long, +}; + +enum FX_LOCALENUMSUBCATEGORY { + FX_LOCALENUMPATTERN_Percent, + FX_LOCALENUMPATTERN_Currency, + FX_LOCALENUMPATTERN_Decimal, + FX_LOCALENUMPATTERN_Integer, +}; + +enum FX_LOCALECATEGORY { + FX_LOCALECATEGORY_Unknown, + FX_LOCALECATEGORY_Date, + FX_LOCALECATEGORY_Time, + FX_LOCALECATEGORY_DateTime, + FX_LOCALECATEGORY_Num, + FX_LOCALECATEGORY_Text, + FX_LOCALECATEGORY_Zero, + FX_LOCALECATEGORY_Null, +}; + +enum FX_DATETIMETYPE { + FX_DATETIMETYPE_Unknown, + FX_DATETIMETYPE_Date, + FX_DATETIMETYPE_Time, + FX_DATETIMETYPE_DateTime, + FX_DATETIMETYPE_TimeDate, +}; + +class LocaleIface { + public: + virtual ~LocaleIface() {} + + virtual WideString GetName() const = 0; + virtual WideString GetNumbericSymbol(FX_LOCALENUMSYMBOL eType) const = 0; + virtual WideString GetDateTimeSymbols() const = 0; + virtual WideString GetMonthName(int32_t nMonth, bool bAbbr) const = 0; + virtual WideString GetDayName(int32_t nWeek, bool bAbbr) const = 0; + virtual WideString GetMeridiemName(bool bAM) const = 0; + virtual FX_TIMEZONE GetTimeZone() const = 0; + virtual WideString GetEraName(bool bAD) const = 0; + virtual WideString GetDatePattern( + FX_LOCALEDATETIMESUBCATEGORY eType) const = 0; + virtual WideString GetTimePattern( + FX_LOCALEDATETIMESUBCATEGORY eType) const = 0; + virtual WideString GetNumPattern(FX_LOCALENUMSUBCATEGORY eType) const = 0; +}; + +#endif // CORE_FXCRT_LOCALE_IFACE_H_ diff --git a/core/fxcrt/pauseindicator_iface.h b/core/fxcrt/pauseindicator_iface.h new file mode 100644 index 0000000000..c12b02e427 --- /dev/null +++ b/core/fxcrt/pauseindicator_iface.h @@ -0,0 +1,16 @@ +// Copyright 2017 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCRT_PAUSEINDICATOR_IFACE_H_ +#define CORE_FXCRT_PAUSEINDICATOR_IFACE_H_ + +class PauseIndicatorIface { + public: + virtual ~PauseIndicatorIface() {} + virtual bool NeedToPauseNow() = 0; +}; + +#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* 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* 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& 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 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 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 const m_pDest; RetainPtr 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& 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 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 #include -#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 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* 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& pBitmap, const RetainPtr& pMask, -- cgit v1.2.3