From afd0d1f488ea55da545b3310fd8f22e45522a695 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 4 Apr 2017 14:37:18 -0700 Subject: 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 Reviewed-by: Lei Zhang --- core/fpdfapi/render/cpdf_dibsource.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fpdfapi/render/cpdf_dibsource.h') diff --git a/core/fpdfapi/render/cpdf_dibsource.h b/core/fpdfapi/render/cpdf_dibsource.h index c77aac1776..f484f57d75 100644 --- a/core/fpdfapi/render/cpdf_dibsource.h +++ b/core/fpdfapi/render/cpdf_dibsource.h @@ -118,7 +118,7 @@ class CPDF_DIBSource : public CFX_DIBSource { CPDF_Document* m_pDocument; const CPDF_Stream* m_pStream; - std::unique_ptr m_pStreamAcc; + CFX_RetainPtr m_pStreamAcc; const CPDF_Dictionary* m_pDict; CPDF_ColorSpace* m_pColorSpace; uint32_t m_Family; @@ -139,8 +139,8 @@ class CPDF_DIBSource : public CFX_DIBSource { uint8_t* m_pMaskedLine; CFX_RetainPtr m_pCachedBitmap; CFX_RetainPtr m_pMask; + CFX_RetainPtr m_pGlobalStream; std::unique_ptr m_pDecoder; - std::unique_ptr m_pGlobalStream; std::unique_ptr m_pJbig2Context; CPDF_Stream* m_pMaskStream; int m_Status; -- cgit v1.2.3