summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-08-30 17:11:19 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-31 01:15:56 +0000
commitcc2b38d41141a939c7ef73c0066418b8d823c681 (patch)
treed35174ad9f3abea74c46a13dd76969cbd0f749dd /core/fpdfapi/render
parent0158106c1c77c6af4f7195d086cb0f2d129de838 (diff)
downloadpdfium-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/fpdfapi/render')
-rw-r--r--core/fpdfapi/render/cpdf_dibsource.cpp7
-rw-r--r--core/fpdfapi/render/cpdf_dibsource.h6
-rw-r--r--core/fpdfapi/render/cpdf_imagecacheentry.cpp2
-rw-r--r--core/fpdfapi/render/cpdf_imagecacheentry.h4
-rw-r--r--core/fpdfapi/render/cpdf_imageloader.cpp2
-rw-r--r--core/fpdfapi/render/cpdf_imageloader.h3
-rw-r--r--core/fpdfapi/render/cpdf_imagerenderer.cpp2
-rw-r--r--core/fpdfapi/render/cpdf_imagerenderer.h2
-rw-r--r--core/fpdfapi/render/cpdf_pagerendercache.cpp2
-rw-r--r--core/fpdfapi/render/cpdf_pagerendercache.h4
-rw-r--r--core/fpdfapi/render/cpdf_progressiverenderer.cpp5
-rw-r--r--core/fpdfapi/render/cpdf_progressiverenderer.h6
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp2
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.h2
14 files changed, 26 insertions, 23 deletions
diff --git a/core/fpdfapi/render/cpdf_dibsource.cpp b/core/fpdfapi/render/cpdf_dibsource.cpp
index a5a368ea2d..08bde6ed8d 100644
--- a/core/fpdfapi/render/cpdf_dibsource.cpp
+++ b/core/fpdfapi/render/cpdf_dibsource.cpp
@@ -314,7 +314,7 @@ int CPDF_DIBSource::StartLoadDIBSource(CPDF_Document* pDoc,
return ret;
}
-int CPDF_DIBSource::ContinueLoadDIBSource(IFX_Pause* pPause) {
+int CPDF_DIBSource::ContinueLoadDIBSource(IFX_PauseIndicator* pPause) {
FXCODEC_STATUS ret;
if (m_Status == 1) {
const CFX_ByteString& decoder = m_pStreamAcc->GetImageDecoder();
@@ -729,7 +729,7 @@ int CPDF_DIBSource::StartLoadMask() {
return m_pMaskStream ? StartLoadMaskDIB() : 1;
}
-int CPDF_DIBSource::ContinueLoadMaskDIB(IFX_Pause* pPause) {
+int CPDF_DIBSource::ContinueLoadMaskDIB(IFX_PauseIndicator* pPause) {
if (!m_pMask)
return 1;
@@ -1124,7 +1124,8 @@ const uint8_t* CPDF_DIBSource::GetScanline(int line) const {
return m_pMaskedLine;
}
-bool CPDF_DIBSource::SkipToScanline(int line, IFX_Pause* pPause) const {
+bool CPDF_DIBSource::SkipToScanline(int line,
+ IFX_PauseIndicator* 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 66a6d4e4e8..f6883ed263 100644
--- a/core/fpdfapi/render/cpdf_dibsource.h
+++ b/core/fpdfapi/render/cpdf_dibsource.h
@@ -49,7 +49,7 @@ class CPDF_DIBSource : public CFX_DIBSource {
bool Load(CPDF_Document* pDoc, const CPDF_Stream* pStream);
// CFX_DIBSource
- bool SkipToScanline(int line, IFX_Pause* pPause) const override;
+ bool SkipToScanline(int line, IFX_PauseIndicator* pPause) const override;
uint8_t* GetBuffer() const override;
const uint8_t* GetScanline(int line) const override;
void DownSampleScanline(int line,
@@ -71,10 +71,10 @@ class CPDF_DIBSource : public CFX_DIBSource {
bool bStdCS = false,
uint32_t GroupFamily = 0,
bool bLoadMask = false);
- int ContinueLoadDIBSource(IFX_Pause* pPause);
+ int ContinueLoadDIBSource(IFX_PauseIndicator* pPause);
int StartLoadMask();
int StartLoadMaskDIB();
- int ContinueLoadMaskDIB(IFX_Pause* pPause);
+ int ContinueLoadMaskDIB(IFX_PauseIndicator* pPause);
int ContinueToLoadMask();
CFX_RetainPtr<CPDF_DIBSource> DetachMask();
diff --git a/core/fpdfapi/render/cpdf_imagecacheentry.cpp b/core/fpdfapi/render/cpdf_imagecacheentry.cpp
index fad94f71ae..4f98b96726 100644
--- a/core/fpdfapi/render/cpdf_imagecacheentry.cpp
+++ b/core/fpdfapi/render/cpdf_imagecacheentry.cpp
@@ -105,7 +105,7 @@ void CPDF_ImageCacheEntry::ContinueGetCachedBitmap(
CalcSize();
}
-int CPDF_ImageCacheEntry::Continue(IFX_Pause* pPause,
+int CPDF_ImageCacheEntry::Continue(IFX_PauseIndicator* pPause,
CPDF_RenderStatus* pRenderStatus) {
int ret = m_pCurBitmap.As<CPDF_DIBSource>()->ContinueLoadDIBSource(pPause);
if (!ret) {
diff --git a/core/fpdfapi/render/cpdf_imagecacheentry.h b/core/fpdfapi/render/cpdf_imagecacheentry.h
index fac2c1ff56..176b2818d9 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_Pause;
+class IFX_PauseIndicator;
class CPDF_ImageCacheEntry {
public:
@@ -37,7 +37,7 @@ class CPDF_ImageCacheEntry {
uint32_t GroupFamily,
bool bLoadMask,
CPDF_RenderStatus* pRenderStatus);
- int Continue(IFX_Pause* pPause, CPDF_RenderStatus* pRenderStatus);
+ int Continue(IFX_PauseIndicator* pPause, CPDF_RenderStatus* pRenderStatus);
CFX_RetainPtr<CFX_DIBSource> DetachBitmap();
CFX_RetainPtr<CFX_DIBSource> DetachMask();
diff --git a/core/fpdfapi/render/cpdf_imageloader.cpp b/core/fpdfapi/render/cpdf_imageloader.cpp
index b09b919baa..60e64449bf 100644
--- a/core/fpdfapi/render/cpdf_imageloader.cpp
+++ b/core/fpdfapi/render/cpdf_imageloader.cpp
@@ -44,7 +44,7 @@ bool CPDF_ImageLoader::Start(const CPDF_ImageObject* pImage,
return ret;
}
-bool CPDF_ImageLoader::Continue(IFX_Pause* pPause,
+bool CPDF_ImageLoader::Continue(IFX_PauseIndicator* 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 47dd2f9812..e96fe37ca1 100644
--- a/core/fpdfapi/render/cpdf_imageloader.h
+++ b/core/fpdfapi/render/cpdf_imageloader.h
@@ -16,6 +16,7 @@
class CPDF_ImageObject;
class CPDF_PageRenderCache;
class CPDF_RenderStatus;
+class IFX_PauseIndicator;
class CPDF_ImageLoader {
public:
@@ -28,7 +29,7 @@ class CPDF_ImageLoader {
uint32_t GroupFamily,
bool bLoadMask,
CPDF_RenderStatus* pRenderStatus);
- bool Continue(IFX_Pause* pPause, CPDF_RenderStatus* pRenderStatus);
+ bool Continue(IFX_PauseIndicator* pPause, CPDF_RenderStatus* pRenderStatus);
CFX_RetainPtr<CFX_DIBSource> m_pBitmap;
CFX_RetainPtr<CFX_DIBSource> m_pMask;
diff --git a/core/fpdfapi/render/cpdf_imagerenderer.cpp b/core/fpdfapi/render/cpdf_imagerenderer.cpp
index e04bd0c0f8..fafa18e5a4 100644
--- a/core/fpdfapi/render/cpdf_imagerenderer.cpp
+++ b/core/fpdfapi/render/cpdf_imagerenderer.cpp
@@ -510,7 +510,7 @@ bool CPDF_ImageRenderer::StartBitmapAlpha() {
return false;
}
-bool CPDF_ImageRenderer::Continue(IFX_Pause* pPause) {
+bool CPDF_ImageRenderer::Continue(IFX_PauseIndicator* 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 345860107f..332cbf515c 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_Pause* pPause);
+ bool Continue(IFX_PauseIndicator* 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 455b7f5ddb..ca5b620316 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_Pause* pPause,
+bool CPDF_PageRenderCache::Continue(IFX_PauseIndicator* pPause,
CPDF_RenderStatus* pRenderStatus) {
int ret = m_pCurImageCacheEntry->Continue(pPause, pRenderStatus);
if (ret == 2)
diff --git a/core/fpdfapi/render/cpdf_pagerendercache.h b/core/fpdfapi/render/cpdf_pagerendercache.h
index a874212392..0a315b74ed 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_Pause;
+class IFX_PauseIndicator;
class CPDF_PageRenderCache {
public:
@@ -41,7 +41,7 @@ class CPDF_PageRenderCache {
bool bLoadMask,
CPDF_RenderStatus* pRenderStatus);
- bool Continue(IFX_Pause* pPause, CPDF_RenderStatus* pRenderStatus);
+ bool Continue(IFX_PauseIndicator* 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 3c6be3ba34..d906a9325d 100644
--- a/core/fpdfapi/render/cpdf_progressiverenderer.cpp
+++ b/core/fpdfapi/render/cpdf_progressiverenderer.cpp
@@ -13,6 +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/fxge/cfx_renderdevice.h"
#include "third_party/base/ptr_util.h"
@@ -34,7 +35,7 @@ CPDF_ProgressiveRenderer::~CPDF_ProgressiveRenderer() {
}
}
-void CPDF_ProgressiveRenderer::Start(IFX_Pause* pPause) {
+void CPDF_ProgressiveRenderer::Start(IFX_PauseIndicator* pPause) {
if (!m_pContext || !m_pDevice || m_Status != Ready) {
m_Status = Failed;
return;
@@ -43,7 +44,7 @@ void CPDF_ProgressiveRenderer::Start(IFX_Pause* pPause) {
Continue(pPause);
}
-void CPDF_ProgressiveRenderer::Continue(IFX_Pause* pPause) {
+void CPDF_ProgressiveRenderer::Continue(IFX_PauseIndicator* 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 b56727836d..195636f168 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_Pause;
+class IFX_PauseIndicator;
class CPDF_ProgressiveRenderer {
public:
@@ -39,8 +39,8 @@ class CPDF_ProgressiveRenderer {
~CPDF_ProgressiveRenderer();
Status GetStatus() const { return m_Status; }
- void Start(IFX_Pause* pPause);
- void Continue(IFX_Pause* pPause);
+ void Start(IFX_PauseIndicator* pPause);
+ void Continue(IFX_PauseIndicator* 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 8f0a51f1e4..380914fd27 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -1102,7 +1102,7 @@ void CPDF_RenderStatus::RenderSingleObject(CPDF_PageObject* pObj,
bool CPDF_RenderStatus::ContinueSingleObject(CPDF_PageObject* pObj,
const CFX_Matrix* pObj2Device,
- IFX_Pause* pPause) {
+ IFX_PauseIndicator* 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 cfaa966ed1..b4872f1d1e 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_Pause* pPause);
+ IFX_PauseIndicator* pPause);
void ProcessClipPath(const CPDF_ClipPath& ClipPath,
const CFX_Matrix* pObj2Device);
CPDF_RenderContext* GetContext() const { return m_pContext.Get(); }