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

Side by Side Diff: core/fpdfapi/page/pageint.h

Issue 2520953004: Avoid calls to WrapUnique in CPDF_streamparser (Closed)
Patch Set: assign unique_ptr Created 4 years, 1 month 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/page/cpdf_streamparser.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 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_PAGE_PAGEINT_H_ 7 #ifndef CORE_FPDFAPI_PAGE_PAGEINT_H_
8 #define CORE_FPDFAPI_PAGE_PAGEINT_H_ 8 #define CORE_FPDFAPI_PAGE_PAGEINT_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 ~CPDF_StreamParser(); 54 ~CPDF_StreamParser();
55 55
56 SyntaxType ParseNextElement(); 56 SyntaxType ParseNextElement();
57 uint8_t* GetWordBuf() { return m_WordBuffer; } 57 uint8_t* GetWordBuf() { return m_WordBuffer; }
58 uint32_t GetWordSize() const { return m_WordSize; } 58 uint32_t GetWordSize() const { return m_WordSize; }
59 uint32_t GetPos() const { return m_Pos; } 59 uint32_t GetPos() const { return m_Pos; }
60 void SetPos(uint32_t pos) { m_Pos = pos; } 60 void SetPos(uint32_t pos) { m_Pos = pos; }
61 std::unique_ptr<CPDF_Object> GetObject() { return std::move(m_pLastObj); } 61 std::unique_ptr<CPDF_Object> GetObject() { return std::move(m_pLastObj); }
62 std::unique_ptr<CPDF_Object> ReadNextObject(bool bAllowNestedArray, 62 std::unique_ptr<CPDF_Object> ReadNextObject(bool bAllowNestedArray,
63 uint32_t dwInArrayLevel); 63 uint32_t dwInArrayLevel);
64 std::unique_ptr<CPDF_Stream> ReadInlineStream(CPDF_Document* pDoc, 64 std::unique_ptr<CPDF_Stream> ReadInlineStream(
65 CPDF_Dictionary* pDict, 65 CPDF_Document* pDoc,
66 CPDF_Object* pCSObj); 66 std::unique_ptr<CPDF_Dictionary> pDict,
67 CPDF_Object* pCSObj);
67 68
68 private: 69 private:
69 friend class cpdf_streamparser_ReadHexString_Test; 70 friend class cpdf_streamparser_ReadHexString_Test;
70 71
71 void GetNextWord(bool& bIsNumber); 72 void GetNextWord(bool& bIsNumber);
72 CFX_ByteString ReadString(); 73 CFX_ByteString ReadString();
73 CFX_ByteString ReadHexString(); 74 CFX_ByteString ReadHexString();
74 bool PositionIsInBounds() const; 75 bool PositionIsInBounds() const;
75 76
76 const uint8_t* m_pBuf; 77 const uint8_t* m_pBuf;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 CPDF_CountedPattern* m_pCountedPattern; 300 CPDF_CountedPattern* m_pCountedPattern;
300 int m_nComps; 301 int m_nComps;
301 FX_FLOAT m_Comps[MAX_PATTERN_COLORCOMPS]; 302 FX_FLOAT m_Comps[MAX_PATTERN_COLORCOMPS];
302 }; 303 };
303 304
304 CFX_ByteStringC PDF_FindKeyAbbreviationForTesting(const CFX_ByteStringC& abbr); 305 CFX_ByteStringC PDF_FindKeyAbbreviationForTesting(const CFX_ByteStringC& abbr);
305 CFX_ByteStringC PDF_FindValueAbbreviationForTesting( 306 CFX_ByteStringC PDF_FindValueAbbreviationForTesting(
306 const CFX_ByteStringC& abbr); 307 const CFX_ByteStringC& abbr);
307 308
308 #endif // CORE_FPDFAPI_PAGE_PAGEINT_H_ 309 #endif // CORE_FPDFAPI_PAGE_PAGEINT_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/page/cpdf_streamparser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698