summaryrefslogtreecommitdiff
path: root/core/fxge/ge/fx_ge_text.cpp
diff options
context:
space:
mode:
authornpm <npm@chromium.org>2016-08-16 15:37:20 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-16 15:37:21 -0700
commitb88b8e47fd7adc14c7aff048c0def0579bdd22dd (patch)
tree50fe31941f6ff8cefa1d6b7eda3834f1f0c34a27 /core/fxge/ge/fx_ge_text.cpp
parent09213860d9d9e9a88132cf69e60bb9af513fc1fa (diff)
downloadpdfium-b88b8e47fd7adc14c7aff048c0def0579bdd22dd.tar.xz
Delete m_ExtHandle and RetainFont because they are not being used.
CFX_SubstFont::m_ExtHandle is never assigned a value different from nullptr. Similarly, IFX_SystemFontInfo::RetainFont has two implementations. Both of these return nullptr, so this method is not needed. Review-Url: https://codereview.chromium.org/2252833002
Diffstat (limited to 'core/fxge/ge/fx_ge_text.cpp')
-rw-r--r--core/fxge/ge/fx_ge_text.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/core/fxge/ge/fx_ge_text.cpp b/core/fxge/ge/fx_ge_text.cpp
index 5fea141a42..9ed751b708 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);