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

Side by Side Diff: core/fpdfapi/parser/cpdf_data_avail.h

Issue 2483633002: Do not load main cross refs for first page in linearized pdf. (Closed)
Patch Set: fix compilation. 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 | « no previous file | core/fpdfapi/parser/cpdf_data_avail.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_PARSER_CPDF_DATA_AVAIL_H_ 7 #ifndef CORE_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_
8 #define CORE_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_ 8 #define CORE_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "core/fpdfapi/parser/cpdf_parser.h" 12 #include "core/fpdfapi/parser/cpdf_parser.h"
13 #include "core/fpdfapi/parser/cpdf_syntax_parser.h" 13 #include "core/fpdfapi/parser/cpdf_syntax_parser.h"
14 #include "core/fxcrt/fx_basic.h" 14 #include "core/fxcrt/fx_basic.h"
15 15
16 class CPDF_Dictionary; 16 class CPDF_Dictionary;
17 class CPDF_HintTables; 17 class CPDF_HintTables;
18 class CPDF_IndirectObjectHolder; 18 class CPDF_IndirectObjectHolder;
19 class CPDF_LinearizedHeader; 19 class CPDF_LinearizedHeader;
20 class CPDF_Parser; 20 class CPDF_Parser;
21 21
22 enum PDF_DATAAVAIL_STATUS { 22 enum PDF_DATAAVAIL_STATUS {
23 PDF_DATAAVAIL_HEADER = 0, 23 PDF_DATAAVAIL_HEADER = 0,
24 PDF_DATAAVAIL_FIRSTPAGE, 24 PDF_DATAAVAIL_FIRSTPAGE,
25 PDF_DATAAVAIL_FIRSTPAGE_PREPARE,
26 PDF_DATAAVAIL_HINTTABLE, 25 PDF_DATAAVAIL_HINTTABLE,
27 PDF_DATAAVAIL_END, 26 PDF_DATAAVAIL_END,
28 PDF_DATAAVAIL_CROSSREF, 27 PDF_DATAAVAIL_CROSSREF,
29 PDF_DATAAVAIL_CROSSREF_ITEM, 28 PDF_DATAAVAIL_CROSSREF_ITEM,
30 PDF_DATAAVAIL_CROSSREF_STREAM, 29 PDF_DATAAVAIL_CROSSREF_STREAM,
31 PDF_DATAAVAIL_TRAILER, 30 PDF_DATAAVAIL_TRAILER,
32 PDF_DATAAVAIL_LOADALLCROSSREF, 31 PDF_DATAAVAIL_LOADALLCROSSREF,
33 PDF_DATAAVAIL_ROOT, 32 PDF_DATAAVAIL_ROOT,
34 PDF_DATAAVAIL_INFO, 33 PDF_DATAAVAIL_INFO,
35 PDF_DATAAVAIL_ACROFORM, 34 PDF_DATAAVAIL_ACROFORM,
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 bool CheckUnkownPageNode(uint32_t dwPageNo, 184 bool CheckUnkownPageNode(uint32_t dwPageNo,
186 PageNode* pPageNode, 185 PageNode* pPageNode,
187 DownloadHints* pHints); 186 DownloadHints* pHints);
188 bool CheckArrayPageNode(uint32_t dwPageNo, 187 bool CheckArrayPageNode(uint32_t dwPageNo,
189 PageNode* pPageNode, 188 PageNode* pPageNode,
190 DownloadHints* pHints); 189 DownloadHints* pHints);
191 bool CheckPageCount(DownloadHints* pHints); 190 bool CheckPageCount(DownloadHints* pHints);
192 bool IsFirstCheck(uint32_t dwPage); 191 bool IsFirstCheck(uint32_t dwPage);
193 void ResetFirstCheck(uint32_t dwPage); 192 void ResetFirstCheck(uint32_t dwPage);
194 bool IsDataAvail(FX_FILESIZE offset, uint32_t size, DownloadHints* pHints); 193 bool IsDataAvail(FX_FILESIZE offset, uint32_t size, DownloadHints* pHints);
194 bool ValidatePage(uint32_t dwPage);
195 bool ValidateForm();
195 196
196 FileAvail* const m_pFileAvail; 197 FileAvail* const m_pFileAvail;
197 IFX_SeekableReadStream* const m_pFileRead; 198 IFX_SeekableReadStream* const m_pFileRead;
198 CPDF_Parser m_parser; 199 CPDF_Parser m_parser;
199 CPDF_SyntaxParser m_syntaxParser; 200 CPDF_SyntaxParser m_syntaxParser;
200 std::unique_ptr<CPDF_Object> m_pRoot; 201 std::unique_ptr<CPDF_Object> m_pRoot;
201 uint32_t m_dwRootObjNum; 202 uint32_t m_dwRootObjNum;
202 uint32_t m_dwInfoObjNum; 203 uint32_t m_dwInfoObjNum;
203 std::unique_ptr<CPDF_LinearizedHeader> m_pLinearized; 204 std::unique_ptr<CPDF_LinearizedHeader> m_pLinearized;
204 CPDF_Object* m_pTrailer; 205 CPDF_Object* m_pTrailer;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 bool m_bTotalLoadPageTree; 246 bool m_bTotalLoadPageTree;
246 bool m_bCurPageDictLoadOK; 247 bool m_bCurPageDictLoadOK;
247 PageNode m_pageNodes; 248 PageNode m_pageNodes;
248 std::set<uint32_t> m_pageMapCheckState; 249 std::set<uint32_t> m_pageMapCheckState;
249 std::set<uint32_t> m_pagesLoadState; 250 std::set<uint32_t> m_pagesLoadState;
250 std::unique_ptr<CPDF_HintTables> m_pHintTables; 251 std::unique_ptr<CPDF_HintTables> m_pHintTables;
251 bool m_bSupportHintTable; 252 bool m_bSupportHintTable;
252 }; 253 };
253 254
254 #endif // CORE_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_ 255 #endif // CORE_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_
OLDNEW
« no previous file with comments | « no previous file | core/fpdfapi/parser/cpdf_data_avail.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698