summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_parser
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-03-08 13:10:55 -0800
committerTom Sepez <tsepez@chromium.org>2016-03-08 13:10:55 -0800
commit310438fb97a2363bd0901401ad2506febd64361b (patch)
tree82e5fc7ed110134123aded5884ec4ca917e2b39f /core/src/fpdfapi/fpdf_parser
parentb70f5a44635d29981abac766d727ff54daea2c37 (diff)
downloadpdfium-310438fb97a2363bd0901401ad2506febd64361b.tar.xz
Split off CPDF_Document into its own .cpp/.h files.
R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1780503002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_parser')
-rw-r--r--core/src/fpdfapi/fpdf_parser/cpdf_document.cpp (renamed from core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp)14
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp1
2 files changed, 14 insertions, 1 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp b/core/src/fpdfapi/fpdf_parser/cpdf_document.cpp
index a63b0ed336..f837c00509 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
+++ b/core/src/fpdfapi/fpdf_parser/cpdf_document.cpp
@@ -4,11 +4,14 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "core/include/fpdfapi/fpdf_parser.h"
+#include "core/include/fpdfapi/cpdf_document.h"
#include <set>
#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_parser.h"
+#include "core/include/fxge/fx_font.h"
+#include "core/src/fpdfapi/fpdf_render/render_int.h"
#include "third_party/base/stl_util.h"
namespace {
@@ -336,3 +339,12 @@ void CPDF_Document::ClearRenderData() {
if (m_pDocRender)
CPDF_ModuleMgr::Get()->GetRenderModule()->ClearDocData(m_pDocRender);
}
+
+void CPDF_Document::ClearRenderFont() {
+ if (!m_pDocRender)
+ return;
+
+ CFX_FontCache* pCache = m_pDocRender->GetFontCache();
+ if (pCache)
+ pCache->FreeCache(FALSE);
+}
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index a00d1bc98d..2b61cdc2a2 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -12,6 +12,7 @@
#include <utility>
#include <vector>
+#include "core/include/fpdfapi/cpdf_document.h"
#include "core/include/fpdfapi/fpdf_module.h"
#include "core/include/fpdfapi/fpdf_page.h"
#include "core/include/fxcrt/fx_ext.h"