summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/pageint.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/pageint.h')
-rw-r--r--core/fpdfapi/page/pageint.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/core/fpdfapi/page/pageint.h b/core/fpdfapi/page/pageint.h
index 0737c2ed6e..9637155343 100644
--- a/core/fpdfapi/page/pageint.h
+++ b/core/fpdfapi/page/pageint.h
@@ -138,12 +138,17 @@ class CPDF_IccProfile {
public:
CPDF_IccProfile(const uint8_t* pData, uint32_t dwSize);
~CPDF_IccProfile();
+
+ bool IsValid() const { return IsSRGB() || IsSupported(); }
+ bool IsSRGB() const { return m_bsRGB; }
+ bool IsSupported() const { return !!m_pTransform; }
+ void* transform() { return m_pTransform; }
uint32_t GetComponents() const { return m_nSrcComponents; }
- bool m_bsRGB;
- void* m_pTransform;
private:
- uint32_t m_nSrcComponents;
+ const bool m_bsRGB;
+ void* m_pTransform = nullptr;
+ uint32_t m_nSrcComponents = 0;
};
class CPDF_DeviceCS : public CPDF_ColorSpace {