Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1753)

Unified Diff: core/fxge/include/cfx_fontcache.h

Issue 2158023002: Pdfium: Fix fonts leaking on ClosePage. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix leaks on PageClose Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
};

Powered by Google App Engine
This is Rietveld 408576698