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

Unified Diff: core/fxge/ge/fx_ge_text.cpp

Issue 2252833002: Delete m_ExtHandle and RetainFont (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 4 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/ge/fx_ge_fontmap.cpp ('k') | core/fxge/include/fx_font.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/ge/fx_ge_text.cpp
diff --git a/core/fxge/ge/fx_ge_text.cpp b/core/fxge/ge/fx_ge_text.cpp
index 5fea141a427f664887227cc5eeb06afd1c4b436c..9ed751b70860bbf182ee012da1a68b2a18e6f300 100644
--- a/core/fxge/ge/fx_ge_text.cpp
+++ b/core/fxge/ge/fx_ge_text.cpp
@@ -113,10 +113,8 @@ CFX_FontCache::~CFX_FontCache() {
}
CFX_FaceCache* CFX_FontCache::GetCachedFace(CFX_Font* pFont) {
- FXFT_Face internal_face = pFont->GetFace();
- const bool bExternal = !internal_face;
- FXFT_Face face =
- bExternal ? (FXFT_Face)pFont->GetSubstFont()->m_ExtHandle : internal_face;
+ FXFT_Face face = pFont->GetFace();
+ const bool bExternal = !face;
CFX_FTCacheMap& map = bExternal ? m_ExtFaceMap : m_FTFaceMap;
auto it = map.find(face);
if (it != map.end()) {
@@ -150,10 +148,8 @@ CFX_TypeFace* CFX_FaceCache::GetDeviceCache(CFX_Font* pFont) {
#endif
void CFX_FontCache::ReleaseCachedFace(CFX_Font* pFont) {
- FXFT_Face internal_face = pFont->GetFace();
- const bool bExternal = !internal_face;
- FXFT_Face face =
- bExternal ? (FXFT_Face)pFont->GetSubstFont()->m_ExtHandle : internal_face;
+ FXFT_Face face = pFont->GetFace();
+ const bool bExternal = !face;
CFX_FTCacheMap& map = bExternal ? m_ExtFaceMap : m_FTFaceMap;
auto it = map.find(face);
« no previous file with comments | « core/fxge/ge/fx_ge_fontmap.cpp ('k') | core/fxge/include/fx_font.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698