summaryrefslogtreecommitdiff
path: root/xfa/fgas
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-07-26 15:52:56 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-26 15:52:56 +0000
commit2daa06ab9596a42c967497c2bae16ddd902dcaf0 (patch)
tree2c1cef58048c0e15482d413fd5ed8f7546dabd36 /xfa/fgas
parentfd8dfdfc54e2af0749663e9e0c3c2ef24b04f59e (diff)
downloadpdfium-2daa06ab9596a42c967497c2bae16ddd902dcaf0.tar.xz
Remove font cache from CFGAS_DefaultFontManager.chromium/3504
The cache is never accessed and retains fonts in memory that will not be used anymore. Change-Id: Ia763499dc88a99741a85afc4ddd09257e8e1119c Reviewed-on: https://pdfium-review.googlesource.com/38898 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa/fgas')
-rw-r--r--xfa/fgas/font/cfgas_defaultfontmanager.cpp4
-rw-r--r--xfa/fgas/font/cfgas_defaultfontmanager.h3
2 files changed, 0 insertions, 7 deletions
diff --git a/xfa/fgas/font/cfgas_defaultfontmanager.cpp b/xfa/fgas/font/cfgas_defaultfontmanager.cpp
index 4d0ff20583..d8ffd548bf 100644
--- a/xfa/fgas/font/cfgas_defaultfontmanager.cpp
+++ b/xfa/fgas/font/cfgas_defaultfontmanager.cpp
@@ -49,8 +49,6 @@ RetainPtr<CFGAS_GEFont> CFGAS_DefaultFontManager::GetFont(
}
}
}
- if (pFont)
- m_CacheFonts.push_back(pFont);
return pFont;
}
@@ -64,7 +62,5 @@ RetainPtr<CFGAS_GEFont> CFGAS_DefaultFontManager::GetDefaultFont(
pFont = pFontMgr->LoadFont(static_cast<const wchar_t*>(nullptr),
dwFontStyles, 0xFFFF);
}
- if (pFont)
- m_CacheFonts.push_back(pFont);
return pFont;
}
diff --git a/xfa/fgas/font/cfgas_defaultfontmanager.h b/xfa/fgas/font/cfgas_defaultfontmanager.h
index 2afe9ebc54..5a2bc1263d 100644
--- a/xfa/fgas/font/cfgas_defaultfontmanager.h
+++ b/xfa/fgas/font/cfgas_defaultfontmanager.h
@@ -24,9 +24,6 @@ class CFGAS_DefaultFontManager {
RetainPtr<CFGAS_GEFont> GetDefaultFont(CFGAS_FontMgr* pFontMgr,
const WideStringView& wsFontFamily,
uint32_t dwFontStyles);
-
- private:
- std::vector<RetainPtr<CFGAS_GEFont>> m_CacheFonts;
};
#endif // XFA_FGAS_FONT_CFGAS_DEFAULTFONTMANAGER_H_