summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_image.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-03-05 15:03:37 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-05 15:03:37 +0000
commit40482e6f06eac0c5089e44df2d62881127eeeb3e (patch)
tree55e760468e422435acee4b10c1ca64faff5d87d4 /core/fpdfapi/page/cpdf_image.cpp
parentaa11f46e7bd846ef26d4cdd2be4f92f7a63d1cdb (diff)
downloadpdfium-40482e6f06eac0c5089e44df2d62881127eeeb3e.tar.xz
Use CPDF_DIBSource::LoadState enum class in more places.
Change-Id: Iaf124c1b1ceca86d220ae654d9d18af7475209b6 Reviewed-on: https://pdfium-review.googlesource.com/27870 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_image.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_image.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/fpdfapi/page/cpdf_image.cpp b/core/fpdfapi/page/cpdf_image.cpp
index 24f58dfeff..8ce4185446 100644
--- a/core/fpdfapi/page/cpdf_image.cpp
+++ b/core/fpdfapi/page/cpdf_image.cpp
@@ -348,15 +348,15 @@ bool CPDF_Image::StartLoadDIBSource(CPDF_Dictionary* pFormResource,
uint32_t GroupFamily,
bool bLoadMask) {
auto source = pdfium::MakeRetain<CPDF_DIBSource>();
- int ret = source->StartLoadDIBSource(m_pDocument.Get(), m_pStream.Get(), true,
- pFormResource, pPageResource, bStdCS,
- GroupFamily, bLoadMask);
- if (ret == 0) {
+ CPDF_DIBSource::LoadState ret = source->StartLoadDIBSource(
+ m_pDocument.Get(), m_pStream.Get(), true, pFormResource, pPageResource,
+ bStdCS, GroupFamily, bLoadMask);
+ if (ret == CPDF_DIBSource::LoadState::kFail) {
m_pDIBSource.Reset();
return false;
}
m_pDIBSource = source;
- if (ret == 2)
+ if (ret == CPDF_DIBSource::LoadState::kContinue)
return true;
m_pMask = source->DetachMask();
@@ -366,11 +366,11 @@ bool CPDF_Image::StartLoadDIBSource(CPDF_Dictionary* pFormResource,
bool CPDF_Image::Continue(IFX_PauseIndicator* pPause) {
RetainPtr<CPDF_DIBSource> pSource = m_pDIBSource.As<CPDF_DIBSource>();
- int ret = pSource->ContinueLoadDIBSource(pPause);
- if (ret == 2)
+ CPDF_DIBSource::LoadState ret = pSource->ContinueLoadDIBSource(pPause);
+ if (ret == CPDF_DIBSource::LoadState::kContinue)
return true;
- if (ret == 1) {
+ if (ret == CPDF_DIBSource::LoadState::kSuccess) {
m_pMask = pSource->DetachMask();
m_MatteColor = pSource->GetMatteColor();
} else {