summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_pagerendercache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/render/cpdf_pagerendercache.cpp')
-rw-r--r--core/fpdfapi/render/cpdf_pagerendercache.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/core/fpdfapi/render/cpdf_pagerendercache.cpp b/core/fpdfapi/render/cpdf_pagerendercache.cpp
index 0d01589af3..781f18f0e0 100644
--- a/core/fpdfapi/render/cpdf_pagerendercache.cpp
+++ b/core/fpdfapi/render/cpdf_pagerendercache.cpp
@@ -94,17 +94,17 @@ bool CPDF_PageRenderCache::StartGetCachedBitmap(
m_pCurImageCacheEntry =
new CPDF_ImageCacheEntry(m_pPage->m_pDocument.Get(), pImage);
}
- int ret = m_pCurImageCacheEntry->StartGetCachedBitmap(
+ CPDF_DIBSource::LoadState ret = m_pCurImageCacheEntry->StartGetCachedBitmap(
pRenderStatus->GetFormResource(), m_pPage->m_pPageResources.Get(), bStdCS,
GroupFamily, bLoadMask, pRenderStatus);
- if (ret == 2)
+ if (ret == CPDF_DIBSource::LoadState::kContinue)
return true;
m_nTimeCount++;
if (!m_bCurFindCache)
m_ImageCache[pStream] = m_pCurImageCacheEntry;
- if (!ret)
+ if (ret == CPDF_DIBSource::LoadState::kFail)
m_nCacheSize += m_pCurImageCacheEntry->EstimateSize();
return false;
@@ -112,8 +112,8 @@ bool CPDF_PageRenderCache::StartGetCachedBitmap(
bool CPDF_PageRenderCache::Continue(IFX_PauseIndicator* pPause,
CPDF_RenderStatus* pRenderStatus) {
- int ret = m_pCurImageCacheEntry->Continue(pPause, pRenderStatus);
- if (ret == 2)
+ bool ret = m_pCurImageCacheEntry->Continue(pPause, pRenderStatus);
+ if (ret)
return true;
m_nTimeCount++;
@@ -121,8 +121,7 @@ bool CPDF_PageRenderCache::Continue(IFX_PauseIndicator* pPause,
m_ImageCache[m_pCurImageCacheEntry->GetImage()->GetStream()] =
m_pCurImageCacheEntry;
}
- if (!ret)
- m_nCacheSize += m_pCurImageCacheEntry->EstimateSize();
+ m_nCacheSize += m_pCurImageCacheEntry->EstimateSize();
return false;
}