summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_dibsource.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-03-05 14:39:37 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-05 14:39:37 +0000
commite9b55327048158958d75ab3577a002084d3aed1b (patch)
tree1103a45105d4dfb602db1489d3d3625be634ea39 /core/fpdfapi/render/cpdf_dibsource.h
parent9a7c2396705a23d1ce6bdba0025eb2316ae301c4 (diff)
downloadpdfium-e9b55327048158958d75ab3577a002084d3aed1b.tar.xz
Add CPDF_DIBSource::LoadState enum class.
Change-Id: I97819912e564e4b52fcdae4ce7f865188fb1a520 Reviewed-on: https://pdfium-review.googlesource.com/27850 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_dibsource.h')
-rw-r--r--core/fpdfapi/render/cpdf_dibsource.h38
1 files changed, 20 insertions, 18 deletions
diff --git a/core/fpdfapi/render/cpdf_dibsource.h b/core/fpdfapi/render/cpdf_dibsource.h
index bb4fdbad90..dce5a535c4 100644
--- a/core/fpdfapi/render/cpdf_dibsource.h
+++ b/core/fpdfapi/render/cpdf_dibsource.h
@@ -44,6 +44,8 @@ class CPDF_DIBSource : public CFX_DIBSource {
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
+ enum class LoadState : uint8_t { kFail, kSuccess, kContinue };
+
~CPDF_DIBSource() override;
bool Load(CPDF_Document* pDoc, const CPDF_Stream* pStream);
@@ -126,30 +128,30 @@ class CPDF_DIBSource : public CFX_DIBSource {
UnownedPtr<const CPDF_Stream> m_pStream;
UnownedPtr<const CPDF_Dictionary> m_pDict;
RetainPtr<CPDF_StreamAcc> m_pStreamAcc;
- CPDF_ColorSpace* m_pColorSpace;
- uint32_t m_Family;
- uint32_t m_bpc;
- uint32_t m_bpc_orig;
- uint32_t m_nComponents;
- uint32_t m_GroupFamily;
- uint32_t m_MatteColor;
- bool m_bLoadMask;
- bool m_bDefaultDecode;
- bool m_bImageMask;
- bool m_bDoBpcCheck;
- bool m_bColorKey;
- bool m_bHasMask;
- bool m_bStdCS;
- DIB_COMP_DATA* m_pCompData;
- uint8_t* m_pLineBuf;
- uint8_t* m_pMaskedLine;
+ CPDF_ColorSpace* m_pColorSpace = nullptr;
+ uint32_t m_Family = 0;
+ uint32_t m_bpc = 0;
+ uint32_t m_bpc_orig = 0;
+ uint32_t m_nComponents = 0;
+ uint32_t m_GroupFamily = 0;
+ uint32_t m_MatteColor = 0;
+ bool m_bLoadMask = false;
+ bool m_bDefaultDecode = true;
+ bool m_bImageMask = false;
+ bool m_bDoBpcCheck = true;
+ bool m_bColorKey = false;
+ bool m_bHasMask = false;
+ bool m_bStdCS = false;
+ DIB_COMP_DATA* m_pCompData = nullptr;
+ uint8_t* m_pLineBuf = nullptr;
+ uint8_t* m_pMaskedLine = nullptr;
RetainPtr<CFX_DIBitmap> m_pCachedBitmap;
RetainPtr<CPDF_DIBSource> m_pMask;
RetainPtr<CPDF_StreamAcc> m_pGlobalStream;
std::unique_ptr<CCodec_ScanlineDecoder> m_pDecoder;
std::unique_ptr<CCodec_Jbig2Context> m_pJbig2Context;
UnownedPtr<CPDF_Stream> m_pMaskStream;
- int m_Status;
+ LoadState m_Status = LoadState::kFail;
};
#endif // CORE_FPDFAPI_RENDER_CPDF_DIBSOURCE_H_