diff options
author | thestig <thestig@chromium.org> | 2016-05-19 17:15:01 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-19 17:15:01 -0700 |
commit | 1f36fa860a170081f66809d634ec7ab83d7cb25e (patch) | |
tree | f8bbb63947678009169a7a40f7432e94b3a4aa20 /core/fpdfapi/fpdf_page/pageint.h | |
parent | d77f417f0c82f16b4f370b913b80dd2b8dcf0f67 (diff) | |
download | pdfium-1f36fa860a170081f66809d634ec7ab83d7cb25e.tar.xz |
Fix the Skia build after 9b1a0ee.
Review-Url: https://codereview.chromium.org/1996533004
Diffstat (limited to 'core/fpdfapi/fpdf_page/pageint.h')
-rw-r--r-- | core/fpdfapi/fpdf_page/pageint.h | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/core/fpdfapi/fpdf_page/pageint.h b/core/fpdfapi/fpdf_page/pageint.h index 8d507a181d..64d106f1dc 100644 --- a/core/fpdfapi/fpdf_page/pageint.h +++ b/core/fpdfapi/fpdf_page/pageint.h @@ -19,6 +19,7 @@ class CPDF_AllStates; class CPDF_ColorSpace; +class CPDF_ExpIntFunc; class CPDF_Font; class CPDF_FontEncoding; class CPDF_Form; @@ -27,6 +28,8 @@ class CPDF_Image; class CPDF_ImageObject; class CPDF_Page; class CPDF_Pattern; +class CPDF_SampledFunc; +class CPDF_StitchFunc; class CPDF_StreamAcc; class CPDF_TextObject; class CPDF_Type3Char; @@ -384,9 +387,15 @@ class CPDF_Function { int& nresults) const; uint32_t CountInputs() const { return m_nInputs; } uint32_t CountOutputs() const { return m_nOutputs; } + FX_FLOAT GetDomain(int i) const { return m_pDomains[i]; } + FX_FLOAT GetRange(int i) const { return m_pRanges[i]; } + + const CPDF_SampledFunc* ToSampledFunc() const; + const CPDF_ExpIntFunc* ToExpIntFunc() const; + const CPDF_StitchFunc* ToStitchFunc() const; protected: - CPDF_Function(); + explicit CPDF_Function(Type type); FX_BOOL Init(CPDF_Object* pObj); virtual FX_BOOL v_Init(CPDF_Object* pObj) = 0; @@ -396,6 +405,7 @@ class CPDF_Function { uint32_t m_nOutputs; FX_FLOAT* m_pDomains; FX_FLOAT* m_pRanges; + const Type m_Type; }; class CPDF_ExpIntFunc : public CPDF_Function { @@ -433,9 +443,17 @@ class CPDF_SampledFunc : public CPDF_Function { FX_BOOL v_Init(CPDF_Object* pObj) override; FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override; + const std::vector<SampleEncodeInfo>& GetEncodeInfo() const { + return m_EncodeInfo; + } + uint32_t GetBitsPerSample() const { return m_nBitsPerSample; } + const CPDF_StreamAcc* GetSampleStream() const { + return m_pSampleStream.get(); + } + private: - std::vector<SampleEncodeInfo> m_pEncodeInfo; - std::vector<SampleDecodeInfo> m_pDecodeInfo; + std::vector<SampleEncodeInfo> m_EncodeInfo; + std::vector<SampleDecodeInfo> m_DecodeInfo; uint32_t m_nBitsPerSample; uint32_t m_SampleMax; std::unique_ptr<CPDF_StreamAcc> m_pSampleStream; @@ -450,6 +468,12 @@ class CPDF_StitchFunc : public CPDF_Function { FX_BOOL v_Init(CPDF_Object* pObj) override; FX_BOOL v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const override; + const std::vector<std::unique_ptr<CPDF_Function>>& GetSubFunctions() const { + return m_pSubFunctions; + } + FX_FLOAT GetBound(size_t i) const { return m_pBounds[i]; } + + private: std::vector<std::unique_ptr<CPDF_Function>> m_pSubFunctions; FX_FLOAT* m_pBounds; FX_FLOAT* m_pEncode; |