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

Side by Side Diff: core/fpdfapi/fpdf_page/cpdf_clippathdata.h

Issue 1998583002: Fix leak in CPDF_StreamContentParser::AddTextObject(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: CollectionSize Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_clippath.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_clippathdata.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_CLIPPATHDATA_H_ 7 #ifndef CORE_FPDFAPI_FPDF_PAGE_CPDF_CLIPPATHDATA_H_
8 #define CORE_FPDFAPI_FPDF_PAGE_CPDF_CLIPPATHDATA_H_ 8 #define CORE_FPDFAPI_FPDF_PAGE_CPDF_CLIPPATHDATA_H_
9 9
10 #include <stdint.h> 10 #include <stdint.h>
11 11
12 #include <memory>
13 #include <utility>
14 #include <vector>
15
12 class CPDF_Path; 16 class CPDF_Path;
13 class CPDF_TextObject; 17 class CPDF_TextObject;
14 18
15 class CPDF_ClipPathData { 19 class CPDF_ClipPathData {
16 public: 20 public:
21 using PathAndTypeData = std::pair<CPDF_Path, uint8_t>;
17 CPDF_ClipPathData(); 22 CPDF_ClipPathData();
18 CPDF_ClipPathData(const CPDF_ClipPathData&); 23 CPDF_ClipPathData(const CPDF_ClipPathData&);
19 ~CPDF_ClipPathData(); 24 ~CPDF_ClipPathData();
20 25
21 void SetCount(int path_count, int text_count); 26 std::vector<PathAndTypeData> m_PathAndTypeList;
22 27 std::vector<std::unique_ptr<CPDF_TextObject>> m_TextList;
23 int m_PathCount;
24 CPDF_Path* m_pPathList;
25 uint8_t* m_pTypeList;
26 int m_TextCount;
27 CPDF_TextObject** m_pTextList;
28 }; 28 };
29 29
30 #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_CLIPPATHDATA_H_ 30 #endif // CORE_FPDFAPI_FPDF_PAGE_CPDF_CLIPPATHDATA_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_clippath.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_clippathdata.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698