summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-07-30 17:06:51 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-30 17:06:51 +0000
commit95121b79bfc0030bf4791be616df860a3e447716 (patch)
treefa6a8b708b93ec9958b84de421746d6ecf256132 /xfa/fxfa
parent552f1ec14f94c09fce4126b5e72d3c02c150ab35 (diff)
downloadpdfium-95121b79bfc0030bf4791be616df860a3e447716.tar.xz
Remove CFGAS_PDFFontMgr::m_FDE2PDFFont font cache.
This cache is never read. Change-Id: Iaa4dcf8debf01ab783c2e757a19b18c0317d6fe1 Reviewed-on: https://pdfium-review.googlesource.com/39150 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/cxfa_fontmgr.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/xfa/fxfa/cxfa_fontmgr.cpp b/xfa/fxfa/cxfa_fontmgr.cpp
index 8bacf07742..7abf720b50 100644
--- a/xfa/fxfa/cxfa_fontmgr.cpp
+++ b/xfa/fxfa/cxfa_fontmgr.cpp
@@ -38,11 +38,9 @@ RetainPtr<CFGAS_GEFont> CXFA_FontMgr::GetFont(
WideString wsEnglishName = FGAS_FontNameToEnglishName(wsFontFamily);
CFGAS_PDFFontMgr* pMgr = hDoc->GetPDFFontMgr();
- CPDF_Font* pPDFFont = nullptr;
RetainPtr<CFGAS_GEFont> pFont;
if (pMgr) {
- pFont = pMgr->GetFont(wsEnglishName.AsStringView(), dwFontStyles, &pPDFFont,
- true);
+ pFont = pMgr->GetFont(wsEnglishName.AsStringView(), dwFontStyles, true);
if (pFont)
return pFont;
}
@@ -51,9 +49,7 @@ RetainPtr<CFGAS_GEFont> CXFA_FontMgr::GetFont(
dwFontStyles);
if (!pFont && pMgr) {
- pPDFFont = nullptr;
- pFont = pMgr->GetFont(wsEnglishName.AsStringView(), dwFontStyles, &pPDFFont,
- false);
+ pFont = pMgr->GetFont(wsEnglishName.AsStringView(), dwFontStyles, false);
if (pFont)
return pFont;
}
@@ -73,11 +69,8 @@ RetainPtr<CFGAS_GEFont> CXFA_FontMgr::GetFont(
hDoc->GetApp()->GetFDEFontMgr());
}
- if (pFont) {
- if (pPDFFont)
- pMgr->SetFont(pFont, pPDFFont);
-
+ if (pFont)
m_FontMap[bsKey] = pFont;
- }
+
return pFont;
}