diff options
author | Lei Zhang <thestig@chromium.org> | 2018-09-14 22:38:30 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-09-14 22:38:30 +0000 |
commit | cb88fa33339ca04c89f340b457f4960d0d4185a2 (patch) | |
tree | 414e96dd85d8348438cbd45c6023b03d721d5869 /xfa/fgas/font/cfgas_gefont.h | |
parent | c6ab97b5b5be7083c4929b7f08b33203a7f932da (diff) | |
download | pdfium-cb88fa33339ca04c89f340b457f4960d0d4185a2.tar.xz |
Use fxcrt::MaybeOwned in CFGAS_GEFont.
Change-Id: Ie1f4763e37832475a60c55b26263405e0bbf09b3
Reviewed-on: https://pdfium-review.googlesource.com/42510
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fgas/font/cfgas_gefont.h')
-rw-r--r-- | xfa/fgas/font/cfgas_gefont.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xfa/fgas/font/cfgas_gefont.h b/xfa/fgas/font/cfgas_gefont.h index 407a232595..08164f7d5f 100644 --- a/xfa/fgas/font/cfgas_gefont.h +++ b/xfa/fgas/font/cfgas_gefont.h @@ -13,8 +13,8 @@ #include <vector> #include "core/fxcrt/fx_memory.h" +#include "core/fxcrt/maybe_owned.h" #include "core/fxcrt/retain_ptr.h" -#include "core/fxcrt/unowned_ptr.h" #include "xfa/fgas/font/cfgas_fontmgr.h" #include "xfa/fgas/font/cfgas_pdffontmgr.h" @@ -45,7 +45,7 @@ class CFGAS_GEFont final : public Retainable { bool GetBBox(FX_RECT* bbox); RetainPtr<CFGAS_GEFont> GetSubstFont(int32_t iGlyphIndex); - CFX_Font* GetDevFont() const { return m_pFont; } + CFX_Font* GetDevFont() const { return m_pFont.Get(); } void SetLogicalFontStyle(uint32_t dwLogFontStyle) { m_bUseLogFontStyle = true; @@ -71,9 +71,8 @@ class CFGAS_GEFont final : public Retainable { WideString GetFamilyName() const; bool m_bUseLogFontStyle = false; - bool m_bExternalFont = false; uint32_t m_dwLogFontStyle = 0; - CFX_Font* m_pFont = nullptr; + MaybeOwned<CFX_Font> m_pFont; // Must come before |m_pFontEncoding|. CFGAS_FontMgr::ObservedPtr const m_pFontMgr; std::unique_ptr<CFX_UnicodeEncodingEx> m_pFontEncoding; std::map<wchar_t, int32_t> m_CharWidthMap; |