From a4ad01fe03ffdd1806d31a9d7bb820f6a69a0afb Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Wed, 15 Feb 2017 16:26:48 -0500 Subject: Move generated graphics and font maps to CPDF_Page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A new CPDF_PageContentGenerator is created for every call of FPDFPage_GenerateContent, so having the maps there will cause duplicated resources to be created every time this method is called. Thus it is better to move these to the page. Change-Id: I47804f79790fc5354f8a94b6387d66b65eda5a20 Reviewed-on: https://pdfium-review.googlesource.com/2717 Reviewed-by: Tom Sepez Commit-Queue: Nicolás Peña --- core/fpdfapi/edit/cpdf_pagecontentgenerator.h | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'core/fpdfapi/edit/cpdf_pagecontentgenerator.h') diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.h b/core/fpdfapi/edit/cpdf_pagecontentgenerator.h index fd80bd8f44..73e75187e4 100644 --- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.h +++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.h @@ -7,7 +7,6 @@ #ifndef CORE_FPDFAPI_EDIT_CPDF_PAGECONTENTGENERATOR_H_ #define CORE_FPDFAPI_EDIT_CPDF_PAGECONTENTGENERATOR_H_ -#include #include #include "core/fxcrt/fx_basic.h" @@ -37,19 +36,6 @@ class CPDF_PageContentGenerator { CFX_ByteString RealizeResource(uint32_t dwResourceObjNum, const CFX_ByteString& bsType); - struct GraphicsData { - FX_FLOAT fillAlpha; - FX_FLOAT strokeAlpha; - bool operator<(const GraphicsData& other) const; - }; - - struct FontData { - CFX_ByteString baseFont; - bool operator<(const FontData& other) const; - }; - - std::map m_GraphicsMap; - std::map m_FontsMap; CPDF_Page* const m_pPage; CPDF_Document* const m_pDocument; std::vector m_pageObjects; -- cgit v1.2.3