diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-08-30 17:11:19 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-31 01:15:56 +0000 |
commit | cc2b38d41141a939c7ef73c0066418b8d823c681 (patch) | |
tree | d35174ad9f3abea74c46a13dd76969cbd0f749dd /core/fxge | |
parent | 0158106c1c77c6af4f7195d086cb0f2d129de838 (diff) | |
download | pdfium-cc2b38d41141a939c7ef73c0066418b8d823c681.tar.xz |
Split IFX_Pause out of fx_basic
This CL moves IFX_Pause out to its own class from fx_basic and updates
includes as needed.
Change-Id: Iebdd183d8c85aa17570f190f1a7d1602c0af3c8b
Reviewed-on: https://pdfium-review.googlesource.com/12491
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge')
-rw-r--r-- | core/fxge/agg/fx_agg_driver.cpp | 2 | ||||
-rw-r--r-- | core/fxge/agg/fx_agg_driver.h | 3 | ||||
-rw-r--r-- | core/fxge/cfx_renderdevice.cpp | 2 | ||||
-rw-r--r-- | core/fxge/cfx_renderdevice.h | 2 | ||||
-rw-r--r-- | core/fxge/dib/cfx_dibsource.cpp | 2 | ||||
-rw-r--r-- | core/fxge/dib/cfx_dibsource.h | 3 | ||||
-rw-r--r-- | core/fxge/dib/cfx_imagerenderer.cpp | 2 | ||||
-rw-r--r-- | core/fxge/dib/cfx_imagerenderer.h | 2 | ||||
-rw-r--r-- | core/fxge/dib/cfx_imagestretcher.cpp | 6 | ||||
-rw-r--r-- | core/fxge/dib/cfx_imagestretcher.h | 7 | ||||
-rw-r--r-- | core/fxge/dib/cfx_imagetransformer.cpp | 2 | ||||
-rw-r--r-- | core/fxge/dib/cfx_imagetransformer.h | 2 | ||||
-rw-r--r-- | core/fxge/dib/cstretchengine.cpp | 5 | ||||
-rw-r--r-- | core/fxge/dib/cstretchengine.h | 5 | ||||
-rw-r--r-- | core/fxge/ifx_renderdevicedriver.cpp | 2 | ||||
-rw-r--r-- | core/fxge/ifx_renderdevicedriver.h | 5 | ||||
-rw-r--r-- | core/fxge/skia/fx_skia_device.cpp | 2 | ||||
-rw-r--r-- | core/fxge/skia/fx_skia_device.h | 3 |
18 files changed, 32 insertions, 25 deletions
diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp index 846920240e..e94ffc1f73 100644 --- a/core/fxge/agg/fx_agg_driver.cpp +++ b/core/fxge/agg/fx_agg_driver.cpp @@ -1553,7 +1553,7 @@ bool CFX_AggDeviceDriver::StartDIBits( } bool CFX_AggDeviceDriver::ContinueDIBits(CFX_ImageRenderer* pHandle, - IFX_Pause* pPause) { + IFX_PauseIndicator* 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 1ce97d7853..c6aafebffc 100644 --- a/core/fxge/agg/fx_agg_driver.h +++ b/core/fxge/agg/fx_agg_driver.h @@ -89,7 +89,8 @@ class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver { uint32_t flags, std::unique_ptr<CFX_ImageRenderer>* handle, int blend_type) override; - bool ContinueDIBits(CFX_ImageRenderer* handle, IFX_Pause* pPause) override; + bool ContinueDIBits(CFX_ImageRenderer* handle, + IFX_PauseIndicator* 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 d0c52e8ade..959c909b5e 100644 --- a/core/fxge/cfx_renderdevice.cpp +++ b/core/fxge/cfx_renderdevice.cpp @@ -835,7 +835,7 @@ bool CFX_RenderDevice::StartDIBitsWithBlend( } bool CFX_RenderDevice::ContinueDIBits(CFX_ImageRenderer* handle, - IFX_Pause* pPause) { + IFX_PauseIndicator* pPause) { return m_pDeviceDriver->ContinueDIBits(handle, pPause); } diff --git a/core/fxge/cfx_renderdevice.h b/core/fxge/cfx_renderdevice.h index 49a0f3e0bc..36fb5ed0f9 100644 --- a/core/fxge/cfx_renderdevice.h +++ b/core/fxge/cfx_renderdevice.h @@ -208,7 +208,7 @@ class CFX_RenderDevice { uint32_t flags, std::unique_ptr<CFX_ImageRenderer>* handle, int blend_type); - bool ContinueDIBits(CFX_ImageRenderer* handle, IFX_Pause* pPause); + bool ContinueDIBits(CFX_ImageRenderer* handle, IFX_PauseIndicator* 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 3a2179660f..c0e7841b89 100644 --- a/core/fxge/dib/cfx_dibsource.cpp +++ b/core/fxge/dib/cfx_dibsource.cpp @@ -629,7 +629,7 @@ uint8_t* CFX_DIBSource::GetBuffer() const { return nullptr; } -bool CFX_DIBSource::SkipToScanline(int line, IFX_Pause* pPause) const { +bool CFX_DIBSource::SkipToScanline(int line, IFX_PauseIndicator* pPause) const { return false; } diff --git a/core/fxge/dib/cfx_dibsource.h b/core/fxge/dib/cfx_dibsource.h index 798e092d16..8b6d960de6 100644 --- a/core/fxge/dib/cfx_dibsource.h +++ b/core/fxge/dib/cfx_dibsource.h @@ -27,6 +27,7 @@ enum FXDIB_Channel { class CFX_ClipRgn; class CFX_DIBitmap; +class IFX_PauseIndicator; class CFX_DIBSource : public CFX_Retainable { public: @@ -34,7 +35,7 @@ class CFX_DIBSource : public CFX_Retainable { virtual uint8_t* GetBuffer() const; virtual const uint8_t* GetScanline(int line) const = 0; - virtual bool SkipToScanline(int line, IFX_Pause* pPause) const; + virtual bool SkipToScanline(int line, IFX_PauseIndicator* 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 6448014ba5..2330fe0587 100644 --- a/core/fxge/dib/cfx_imagerenderer.cpp +++ b/core/fxge/dib/cfx_imagerenderer.cpp @@ -88,7 +88,7 @@ CFX_ImageRenderer::CFX_ImageRenderer( CFX_ImageRenderer::~CFX_ImageRenderer() {} -bool CFX_ImageRenderer::Continue(IFX_Pause* pPause) { +bool CFX_ImageRenderer::Continue(IFX_PauseIndicator* 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 97427ceb91..068fe34a89 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_Pause* pPause); + bool Continue(IFX_PauseIndicator* pPause); private: const CFX_RetainPtr<CFX_DIBitmap> m_pDevice; diff --git a/core/fxge/dib/cfx_imagestretcher.cpp b/core/fxge/dib/cfx_imagestretcher.cpp index 3c0a065868..0b7c542b30 100644 --- a/core/fxge/dib/cfx_imagestretcher.cpp +++ b/core/fxge/dib/cfx_imagestretcher.cpp @@ -125,7 +125,7 @@ bool CFX_ImageStretcher::Start() { return StartStretch(); } -bool CFX_ImageStretcher::Continue(IFX_Pause* pPause) { +bool CFX_ImageStretcher::Continue(IFX_PauseIndicator* pPause) { if (m_Flags & FXDIB_DOWNSAMPLE) return ContinueQuickStretch(pPause); return ContinueStretch(pPause); @@ -143,7 +143,7 @@ bool CFX_ImageStretcher::StartStretch() { return true; } -bool CFX_ImageStretcher::ContinueStretch(IFX_Pause* pPause) { +bool CFX_ImageStretcher::ContinueStretch(IFX_PauseIndicator* pPause) { return m_pStretchEngine && m_pStretchEngine->Continue(pPause); } @@ -172,7 +172,7 @@ bool CFX_ImageStretcher::StartQuickStretch() { return true; } -bool CFX_ImageStretcher::ContinueQuickStretch(IFX_Pause* pPause) { +bool CFX_ImageStretcher::ContinueQuickStretch(IFX_PauseIndicator* pPause) { if (!m_pScanline) return false; diff --git a/core/fxge/dib/cfx_imagestretcher.h b/core/fxge/dib/cfx_imagestretcher.h index 45928ee141..f31669b866 100644 --- a/core/fxge/dib/cfx_imagestretcher.h +++ b/core/fxge/dib/cfx_imagestretcher.h @@ -15,6 +15,7 @@ #include "core/fxge/fx_dib.h" class CFX_DIBSource; +class IFX_PauseIndicator; class CFX_ImageStretcher { public: @@ -27,15 +28,15 @@ class CFX_ImageStretcher { ~CFX_ImageStretcher(); bool Start(); - bool Continue(IFX_Pause* pPause); + bool Continue(IFX_PauseIndicator* pPause); CFX_RetainPtr<CFX_DIBSource> source() { return m_pSource; } private: bool StartQuickStretch(); bool StartStretch(); - bool ContinueQuickStretch(IFX_Pause* pPause); - bool ContinueStretch(IFX_Pause* pPause); + bool ContinueQuickStretch(IFX_PauseIndicator* pPause); + bool ContinueStretch(IFX_PauseIndicator* pPause); CFX_UnownedPtr<IFX_ScanlineComposer> const m_pDest; CFX_RetainPtr<CFX_DIBSource> m_pSource; diff --git a/core/fxge/dib/cfx_imagetransformer.cpp b/core/fxge/dib/cfx_imagetransformer.cpp index c05dd795b5..e64a2645da 100644 --- a/core/fxge/dib/cfx_imagetransformer.cpp +++ b/core/fxge/dib/cfx_imagetransformer.cpp @@ -244,7 +244,7 @@ CFX_ImageTransformer::CFX_ImageTransformer( CFX_ImageTransformer::~CFX_ImageTransformer() {} -bool CFX_ImageTransformer::Continue(IFX_Pause* pPause) { +bool CFX_ImageTransformer::Continue(IFX_PauseIndicator* 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 60e4714a65..694c44c932 100644 --- a/core/fxge/dib/cfx_imagetransformer.h +++ b/core/fxge/dib/cfx_imagetransformer.h @@ -25,7 +25,7 @@ class CFX_ImageTransformer { const FX_RECT* pClip); ~CFX_ImageTransformer(); - bool Continue(IFX_Pause* pPause); + bool Continue(IFX_PauseIndicator* pPause); const FX_RECT& result() const { return m_result; } CFX_RetainPtr<CFX_DIBitmap> DetachBitmap(); diff --git a/core/fxge/dib/cstretchengine.cpp b/core/fxge/dib/cstretchengine.cpp index b5cf4a781d..4822d32b83 100644 --- a/core/fxge/dib/cstretchengine.cpp +++ b/core/fxge/dib/cstretchengine.cpp @@ -9,6 +9,7 @@ #include <algorithm> #include <utility> +#include "core/fxcrt/ifx_pauseindicator.h" #include "core/fxge/dib/cfx_dibitmap.h" #include "core/fxge/dib/cfx_dibsource.h" #include "core/fxge/dib/ifx_scanlinecomposer.h" @@ -310,7 +311,7 @@ CStretchEngine::CStretchEngine(IFX_ScanlineComposer* pDestBitmap, CStretchEngine::~CStretchEngine() {} -bool CStretchEngine::Continue(IFX_Pause* pPause) { +bool CStretchEngine::Continue(IFX_PauseIndicator* pPause) { while (m_State == 1) { if (ContinueStretchHorz(pPause)) return true; @@ -347,7 +348,7 @@ bool CStretchEngine::StartStretchHorz() { return true; } -bool CStretchEngine::ContinueStretchHorz(IFX_Pause* pPause) { +bool CStretchEngine::ContinueStretchHorz(IFX_PauseIndicator* 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 049059361e..dd207af30d 100644 --- a/core/fxge/dib/cstretchengine.h +++ b/core/fxge/dib/cstretchengine.h @@ -13,6 +13,7 @@ #include "core/fxcrt/fx_coordinates.h" #include "core/fxge/fx_dib.h" +class IFX_PauseIndicator; class IFX_ScanlineComposer; class CStretchEngine { @@ -26,10 +27,10 @@ class CStretchEngine { int flags); ~CStretchEngine(); - bool Continue(IFX_Pause* pPause); + bool Continue(IFX_PauseIndicator* pPause); bool StartStretchHorz(); - bool ContinueStretchHorz(IFX_Pause* pPause); + bool ContinueStretchHorz(IFX_PauseIndicator* pPause); void StretchVert(); class CWeightTable { diff --git a/core/fxge/ifx_renderdevicedriver.cpp b/core/fxge/ifx_renderdevicedriver.cpp index ac7a7424e7..378c9b89ef 100644 --- a/core/fxge/ifx_renderdevicedriver.cpp +++ b/core/fxge/ifx_renderdevicedriver.cpp @@ -58,7 +58,7 @@ CFX_RetainPtr<CFX_DIBitmap> IFX_RenderDeviceDriver::GetBackDrop() { } bool IFX_RenderDeviceDriver::ContinueDIBits(CFX_ImageRenderer* handle, - IFX_Pause* pPause) { + IFX_PauseIndicator* pPause) { return false; } diff --git a/core/fxge/ifx_renderdevicedriver.h b/core/fxge/ifx_renderdevicedriver.h index 1e4e30584e..cdea22e2db 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_Pause; +class IFX_PauseIndicator; struct FX_RECT; class IFX_RenderDeviceDriver { @@ -86,7 +86,8 @@ class IFX_RenderDeviceDriver { uint32_t flags, std::unique_ptr<CFX_ImageRenderer>* handle, int blend_type) = 0; - virtual bool ContinueDIBits(CFX_ImageRenderer* handle, IFX_Pause* pPause); + virtual bool ContinueDIBits(CFX_ImageRenderer* handle, + IFX_PauseIndicator* 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 6dd49d1be7..05a4c3a9ed 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -2391,7 +2391,7 @@ bool CFX_SkiaDeviceDriver::StartDIBits( } bool CFX_SkiaDeviceDriver::ContinueDIBits(CFX_ImageRenderer* handle, - IFX_Pause* pPause) { + IFX_PauseIndicator* 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 2a92a36aac..df28479d9a 100644 --- a/core/fxge/skia/fx_skia_device.h +++ b/core/fxge/skia/fx_skia_device.h @@ -120,7 +120,8 @@ class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver { std::unique_ptr<CFX_ImageRenderer>* handle, int blend_type) override; - bool ContinueDIBits(CFX_ImageRenderer* handle, IFX_Pause* pPause) override; + bool ContinueDIBits(CFX_ImageRenderer* handle, + IFX_PauseIndicator* pPause) override; bool DrawBitsWithMask(const CFX_RetainPtr<CFX_DIBSource>& pBitmap, const CFX_RetainPtr<CFX_DIBSource>& pMask, |