From 7cda31ac2f2884166f044937619478a6103198cf Mon Sep 17 00:00:00 2001 From: tsepez Date: Wed, 7 Dec 2016 12:10:20 -0800 Subject: Refcount IFGAS_ streams all the time, too IFGAS_Streams are not part of the IFX_Stream hierarchy, but can be made from such. Review-Url: https://codereview.chromium.org/2559763002 --- xfa/fgas/font/cfgas_gefont.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'xfa/fgas/font/cfgas_gefont.h') diff --git a/xfa/fgas/font/cfgas_gefont.h b/xfa/fgas/font/cfgas_gefont.h index b4fcf25ae1..86e5e4c955 100644 --- a/xfa/fgas/font/cfgas_gefont.h +++ b/xfa/fgas/font/cfgas_gefont.h @@ -33,7 +33,7 @@ class CFGAS_GEFont { static CFGAS_GEFont* LoadFont(const uint8_t* pBuffer, int32_t iLength, CFGAS_FontMgr* pFontMgr); - static CFGAS_GEFont* LoadFont(IFGAS_Stream* pFontStream, + static CFGAS_GEFont* LoadFont(const CFX_RetainPtr& pFontStream, CFGAS_FontMgr* pFontMgr, bool bSaveStream); #endif @@ -69,7 +69,8 @@ class CFGAS_GEFont { uint32_t dwFontStyles, uint16_t wCodePage); bool LoadFontInternal(const uint8_t* pBuffer, int32_t length); - bool LoadFontInternal(IFGAS_Stream* pFontStream, bool bSaveStream); + bool LoadFontInternal(const CFX_RetainPtr& pFontStream, + bool bSaveStream); #endif bool LoadFontInternal(CFX_Font* pExternalFont); bool LoadFontInternal(std::unique_ptr pInternalFont); @@ -97,7 +98,7 @@ class CFGAS_GEFont { CFGAS_FontMgr* const m_pFontMgr; int32_t m_iRefCount; bool m_bExternalFont; - std::unique_ptr> m_pStream; + CFX_RetainPtr m_pStream; CFX_RetainPtr m_pFileRead; std::unique_ptr m_pFontEncoding; std::unique_ptr> m_pCharWidthMap; -- cgit v1.2.3