diff options
Diffstat (limited to 'core/fpdfapi/page/cpdf_color.h')
-rw-r--r-- | core/fpdfapi/page/cpdf_color.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/fpdfapi/page/cpdf_color.h b/core/fpdfapi/page/cpdf_color.h index cb7352806e..2eac7cfacb 100644 --- a/core/fpdfapi/page/cpdf_color.h +++ b/core/fpdfapi/page/cpdf_color.h @@ -23,8 +23,8 @@ class CPDF_Color { void Copy(const CPDF_Color* pSrc); void SetColorSpace(CPDF_ColorSpace* pCS); - void SetValue(float* comp); - void SetValue(CPDF_Pattern* pPattern, float* comp, uint32_t ncomps); + void SetValue(const float* comp); + void SetValue(CPDF_Pattern* pPattern, const float* comp, uint32_t ncomps); bool GetRGB(int* R, int* G, int* B) const; CPDF_Pattern* GetPattern() const; @@ -33,9 +33,13 @@ class CPDF_Color { protected: void ReleaseBuffer(); void ReleaseColorSpace(); + bool IsPatternInternal() const; - CPDF_ColorSpace* m_pCS; - float* m_pBuffer; + // TODO(thestig): Convert this to a smart pointer or vector. + // |m_pBuffer| is created by |m_pCS|, so if it is non-null, then so is + // |m_pCS|. + float* m_pBuffer = nullptr; + CPDF_ColorSpace* m_pCS = nullptr; }; #endif // CORE_FPDFAPI_PAGE_CPDF_COLOR_H_ |