Chromium Code Reviews| Index: core/fxge/include/cfx_fontcache.h |
| diff --git a/core/fxge/include/cfx_fontcache.h b/core/fxge/include/cfx_fontcache.h |
| index d4a4dddaa5691cbaa8a1647fe4cbf1834fcc7289..29b25c2b816293bf80281818d005b4290227af76 100644 |
| --- a/core/fxge/include/cfx_fontcache.h |
| +++ b/core/fxge/include/cfx_fontcache.h |
| @@ -21,13 +21,17 @@ class CFX_FontCache { |
| ~CFX_FontCache(); |
| CFX_FaceCache* GetCachedFace(CFX_Font* pFont); |
| void ReleaseCachedFace(CFX_Font* pFont); |
| - void FreeCache(FX_BOOL bRelease = FALSE); |
| #ifdef _SKIA_SUPPORT_ |
| CFX_TypeFace* GetDeviceCache(CFX_Font* pFont); |
| #endif |
| private: |
| - using CFX_FTCacheMap = std::map<FXFT_Face, CFX_CountedFaceCache*>; |
| + struct CountedFaceCache { |
| + CFX_FaceCache* m_Obj; |
| + uint32_t m_nCount; |
| + }; |
| + |
| + using CFX_FTCacheMap = std::map<FXFT_Face, CountedFaceCache*>; |
|
dsinclair
2016/09/14 17:51:51
Can CountedFaceCache be a unique_ptr?
snake
2016/09/14 19:06:29
Done
Now used unique_ptr
|
| CFX_FTCacheMap m_FTFaceMap; |
| CFX_FTCacheMap m_ExtFaceMap; |
| }; |