diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-04-04 14:37:18 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-04 21:48:48 +0000 |
commit | afd0d1f488ea55da545b3310fd8f22e45522a695 (patch) | |
tree | 89136eba4669421b6f828edb9f3d69ee558110d0 /core/fpdfapi/page/pageint.h | |
parent | 4f8b044b95dc282959dfe41453e2a9c1ec7e9354 (diff) | |
download | pdfium-afd0d1f488ea55da545b3310fd8f22e45522a695.tar.xz |
RefCount CPDF_StreamAcc all the time.
Pass stream argument to constructor; it feels like a
stream accessor should always be made from a stream rather
than passing one in after the fact.
Change-Id: Iaa46cb37677b81f0170f5d39bab76ad38ea4af44
Reviewed-on: https://pdfium-review.googlesource.com/3620
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/pageint.h')
-rw-r--r-- | core/fpdfapi/page/pageint.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/fpdfapi/page/pageint.h b/core/fpdfapi/page/pageint.h index a7a00f02ee..05865ca58e 100644 --- a/core/fpdfapi/page/pageint.h +++ b/core/fpdfapi/page/pageint.h @@ -12,14 +12,13 @@ #include "core/fpdfapi/page/cpdf_colorspace.h" #include "core/fpdfapi/page/cpdf_countedobject.h" +#include "core/fpdfapi/parser/cpdf_stream_acc.h" #include "core/fxcrt/cfx_retain_ptr.h" class CPDF_ExpIntFunc; class CPDF_Pattern; class CPDF_SampledFunc; class CPDF_StitchFunc; -class CPDF_Stream; -class CPDF_StreamAcc; class CPDF_Function { public: @@ -102,8 +101,8 @@ class CPDF_SampledFunc : public CPDF_Function { return m_EncodeInfo; } uint32_t GetBitsPerSample() const { return m_nBitsPerSample; } - const CPDF_StreamAcc* GetSampleStream() const { - return m_pSampleStream.get(); + CFX_RetainPtr<CPDF_StreamAcc> GetSampleStream() const { + return m_pSampleStream; } private: @@ -111,7 +110,7 @@ class CPDF_SampledFunc : public CPDF_Function { std::vector<SampleDecodeInfo> m_DecodeInfo; uint32_t m_nBitsPerSample; uint32_t m_SampleMax; - std::unique_ptr<CPDF_StreamAcc> m_pSampleStream; + CFX_RetainPtr<CPDF_StreamAcc> m_pSampleStream; }; class CPDF_StitchFunc : public CPDF_Function { |