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

Side by Side Diff: core/src/fpdfapi/fpdf_parser/parser_int.h

Issue 1353093003: Support linearized loading (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
(Empty)
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2015 Foxit Software Inc. http://www.foxitsoftware.com
Tom Sepez 2015/09/22 19:17:59 Nah, no need to update this every time the year ch
Lei Zhang 2015/09/22 23:33:43 Well, if FoxIt is writing this code in 2015... Al
jun_fang 2015/09/23 12:26:58 OK. will keep 2014 here.
6
7 #ifndef _FPDFAPI_PARSER_INT_H_
Lei Zhang 2015/09/22 23:33:43 CORE_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_
jun_fang 2015/09/23 12:26:58 Acknowledged.
8 #define _FPDFAPI_PARSER_INT_H_
9
10 class CPDF_DataAvail;
11
12 class CPDF_HintTables {
13 public:
14 CPDF_HintTables(CPDF_DataAvail* pDataAvail, CPDF_Dictionary* pLinearized)
15 : m_pLinearizedDict(pLinearized),
16 m_pHintStream(nullptr),
17 m_pDataAvail(pDataAvail),
18 m_nFirstPageSharedObjs(0),
19 m_szFirstPageObjOffset(0) {}
20 ~CPDF_HintTables();
21 FX_BOOL GetPagePos(int index,
22 FX_FILESIZE& szPageStartPos,
23 FX_FILESIZE& szPageLength,
24 FX_DWORD& dwObjNum);
25 FX_BOOL CheckPage(int index, IFX_DownloadHints* pHints);
26 FX_BOOL LoadHintStream(CPDF_Stream* pHintStream);
27
28 protected:
29 FX_BOOL ReadPageHintTable(CFX_BitStream& bs);
30 FX_BOOL ReadSharedObjHintTable(CFX_BitStream& bs);
31 FX_DWORD GetItemLength(int index, const CFX_FileSizeArray& szArray);
32
33 private:
34 int ReadPrimaryHintStreamOffset(CFX_BitStream& bs) const;
35 int ReadPrimaryHintStreamLength(CFX_BitStream& bs) const;
36
37 CPDF_Dictionary* m_pLinearizedDict;
38 CPDF_Stream* m_pHintStream;
39 CPDF_DataAvail* m_pDataAvail;
40 FX_DWORD m_nFirstPageSharedObjs;
41 FX_FILESIZE m_szFirstPageObjOffset;
42 CFX_DWordArray m_dwDeltaNObjsArray;
43 CFX_DWordArray m_dwNSharedObjsArray;
44 CFX_DWordArray m_dwSharedObjNumArray;
45 CFX_DWordArray m_dwIdentifierArray;
46 CFX_FileSizeArray m_szPageOffsetArray;
47 CFX_FileSizeArray m_szSharedObjOffsetArray;
48 };
49 #endif //_FPDFAPI_PARSER_INT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698