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

Unified Diff: core/fpdfapi/fpdf_render/fpdf_render.cpp

Issue 2158023002: Pdfium: Fix fonts leaking on ClosePage. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix xfa tests. 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
Index: core/fpdfapi/fpdf_render/fpdf_render.cpp
diff --git a/core/fpdfapi/fpdf_render/fpdf_render.cpp b/core/fpdfapi/fpdf_render/fpdf_render.cpp
index fbb0745506a67206334b967e20fd21494c4b95ef..0bdb0a094c92e96a44ce1c6d09ba0299a94e584b 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -30,14 +30,13 @@
#include "core/fpdfapi/fpdf_render/include/cpdf_textrenderer.h"
#include "core/fpdfapi/include/cpdf_modulemgr.h"
#include "core/fpdfdoc/include/cpdf_occontext.h"
-#include "core/fxge/include/cfx_fontcache.h"
#include "core/fxge/include/cfx_fxgedevice.h"
#include "core/fxge/include/cfx_graphstatedata.h"
#include "core/fxge/include/cfx_pathdata.h"
#include "core/fxge/include/cfx_renderdevice.h"
CPDF_DocRenderData::CPDF_DocRenderData(CPDF_Document* pPDFDoc)
- : m_pPDFDoc(pPDFDoc), m_pFontCache(new CFX_FontCache) {}
+ : m_pPDFDoc(pPDFDoc) {}
CPDF_DocRenderData::~CPDF_DocRenderData() {
Clear(TRUE);
@@ -63,15 +62,6 @@ void CPDF_DocRenderData::Clear(FX_BOOL bRelease) {
m_TransferFuncMap.erase(curr_it);
}
}
-
- if (m_pFontCache) {
- if (bRelease) {
- delete m_pFontCache;
- m_pFontCache = nullptr;
- } else {
- m_pFontCache->FreeCache(FALSE);
- }
- }
}
CPDF_Type3Cache* CPDF_DocRenderData::GetCachedType3(CPDF_Type3Font* pFont) {

Powered by Google App Engine
This is Rietveld 408576698