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

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

Issue 2350763002: Revert of Pdfium: Fix fonts leaking on ClosePage. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: 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
« no previous file with comments | « core/fxge/include/cfx_facecache.h ('k') | core/fxge/include/cfx_renderdevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/include/cfx_fontcache.h
diff --git a/core/fxge/include/cfx_fontcache.h b/core/fxge/include/cfx_fontcache.h
index dd9a176d19145314e82ec728df2c0353929e5edd..d4a4dddaa5691cbaa8a1647fe4cbf1834fcc7289 100644
--- a/core/fxge/include/cfx_fontcache.h
+++ b/core/fxge/include/cfx_fontcache.h
@@ -8,7 +8,6 @@
#define CORE_FXGE_INCLUDE_CFX_FONTCACHE_H_
#include <map>
-#include <memory>
#include "core/fxcrt/include/fx_system.h"
#include "core/fxge/include/fx_font.h"
@@ -20,21 +19,15 @@
public:
CFX_FontCache();
~CFX_FontCache();
- CFX_FaceCache* GetCachedFace(const CFX_Font* pFont);
- void ReleaseCachedFace(const CFX_Font* pFont);
+ CFX_FaceCache* GetCachedFace(CFX_Font* pFont);
+ void ReleaseCachedFace(CFX_Font* pFont);
+ void FreeCache(FX_BOOL bRelease = FALSE);
#ifdef _SKIA_SUPPORT_
- CFX_TypeFace* GetDeviceCache(const CFX_Font* pFont);
+ CFX_TypeFace* GetDeviceCache(CFX_Font* pFont);
#endif
private:
- struct CountedFaceCache {
- CountedFaceCache();
- ~CountedFaceCache();
- std::unique_ptr<CFX_FaceCache> m_Obj;
- uint32_t m_nCount;
- };
-
- using CFX_FTCacheMap = std::map<FXFT_Face, std::unique_ptr<CountedFaceCache>>;
+ using CFX_FTCacheMap = std::map<FXFT_Face, CFX_CountedFaceCache*>;
CFX_FTCacheMap m_FTFaceMap;
CFX_FTCacheMap m_ExtFaceMap;
};
« no previous file with comments | « core/fxge/include/cfx_facecache.h ('k') | core/fxge/include/cfx_renderdevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698