From 05aa09d3ebfd587dd8e1116b6cac8053a2944a1a Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Fri, 6 Jul 2018 17:38:36 +0000 Subject: Make MarkData::mMarks a vector of RetainPtr It is currently a vector of CPDF_ContentMarkItem. Copying MarkData whenever a content mark is opened or closed is inefficient since each MarkData will have copies of the same CPDF_ContentMarkItems. This CL changes the vector inside MarkData to contains only pointers to the CPDF_ContentMarkItems rather than copies of those items. More importantly, this unifies the dictionaries of each content mark. Previously, there were as many copies of those dictionaries as content marks scope changes inside the mark with parameters. Bug: pdfium:1037 Change-Id: Ia6f79b401d4e14ac07dbba81bbd97df965b77c94 Reviewed-on: https://pdfium-review.googlesource.com/37135 Commit-Queue: Henrique Nakashima Reviewed-by: Ryan Harrison --- core/fpdfapi/page/cpdf_contentmark.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/fpdfapi/page/cpdf_contentmark.h') diff --git a/core/fpdfapi/page/cpdf_contentmark.h b/core/fpdfapi/page/cpdf_contentmark.h index 27116afeef..ac21151ede 100644 --- a/core/fpdfapi/page/cpdf_contentmark.h +++ b/core/fpdfapi/page/cpdf_contentmark.h @@ -46,7 +46,7 @@ class CPDF_ContentMark { void DeleteLastMark(); private: - std::vector m_Marks; + std::vector> m_Marks; }; RetainPtr m_pMarkData; -- cgit v1.2.3