summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_imagecacheentry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/render/cpdf_imagecacheentry.cpp')
-rw-r--r--core/fpdfapi/render/cpdf_imagecacheentry.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/core/fpdfapi/render/cpdf_imagecacheentry.cpp b/core/fpdfapi/render/cpdf_imagecacheentry.cpp
index f4be2af12c..f0b0c33750 100644
--- a/core/fpdfapi/render/cpdf_imagecacheentry.cpp
+++ b/core/fpdfapi/render/cpdf_imagecacheentry.cpp
@@ -68,13 +68,14 @@ CPDF_DIBSource::LoadState CPDF_ImageCacheEntry::StartGetCachedBitmap(
}
m_pCurBitmap = pdfium::MakeRetain<CPDF_DIBSource>();
- int ret = m_pCurBitmap.As<CPDF_DIBSource>()->StartLoadDIBSource(
- m_pDocument.Get(), m_pImage->GetStream(), true, pFormResources,
- pPageResources, bStdCS, GroupFamily, bLoadMask);
- if (ret == 2)
+ CPDF_DIBSource::LoadState ret =
+ m_pCurBitmap.As<CPDF_DIBSource>()->StartLoadDIBSource(
+ m_pDocument.Get(), m_pImage->GetStream(), true, pFormResources,
+ pPageResources, bStdCS, GroupFamily, bLoadMask);
+ if (ret == CPDF_DIBSource::LoadState::kContinue)
return CPDF_DIBSource::LoadState::kContinue;
- if (ret == 1)
+ if (ret == CPDF_DIBSource::LoadState::kSuccess)
ContinueGetCachedBitmap(pRenderStatus);
else
m_pCurBitmap.Reset();
@@ -83,11 +84,12 @@ CPDF_DIBSource::LoadState CPDF_ImageCacheEntry::StartGetCachedBitmap(
bool CPDF_ImageCacheEntry::Continue(IFX_PauseIndicator* pPause,
CPDF_RenderStatus* pRenderStatus) {
- int ret = m_pCurBitmap.As<CPDF_DIBSource>()->ContinueLoadDIBSource(pPause);
- if (ret == 2)
+ CPDF_DIBSource::LoadState ret =
+ m_pCurBitmap.As<CPDF_DIBSource>()->ContinueLoadDIBSource(pPause);
+ if (ret == CPDF_DIBSource::LoadState::kContinue)
return true;
- if (ret == 1)
+ if (ret == CPDF_DIBSource::LoadState::kSuccess)
ContinueGetCachedBitmap(pRenderStatus);
else
m_pCurBitmap.Reset();