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

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

Issue 1778173002: Split apart the remainder of fpdf_render_render.cpp into per-class files. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: remove more stray includes. Created 4 years, 9 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
1 // Copyright 2014 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_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_ 7 #ifndef CORE_SRC_FPDFAPI_FPDF_PARSER_CPDF_HINT_TABLES_H_
8 #define CORE_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_ 8 #define CORE_SRC_FPDFAPI_FPDF_PARSER_CPDF_HINT_TABLES_H_
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "core/include/fpdfapi/ipdf_data_avail.h"
12 #include "core/include/fxcrt/fx_basic.h" 13 #include "core/include/fxcrt/fx_basic.h"
13 #include "core/include/fxcrt/fx_stream.h" 14 #include "core/include/fxcrt/fx_stream.h"
14 15
15 class CFX_BitStream; 16 class CFX_BitStream;
16 class CPDF_DataAvail; 17 class CPDF_DataAvail;
17 class CPDF_Dictionary; 18 class CPDF_Dictionary;
18 class CPDF_Stream; 19 class CPDF_Stream;
19 class IFX_DownloadHints;
20 20
21 class CPDF_HintTables { 21 class CPDF_HintTables {
22 public: 22 public:
23 CPDF_HintTables(CPDF_DataAvail* pDataAvail, CPDF_Dictionary* pLinearized) 23 CPDF_HintTables(CPDF_DataAvail* pDataAvail, CPDF_Dictionary* pLinearized)
24 : m_pLinearizedDict(pLinearized), 24 : m_pLinearizedDict(pLinearized),
25 m_pDataAvail(pDataAvail), 25 m_pDataAvail(pDataAvail),
26 m_nFirstPageSharedObjs(0), 26 m_nFirstPageSharedObjs(0),
27 m_szFirstPageObjOffset(0) {} 27 m_szFirstPageObjOffset(0) {}
28 ~CPDF_HintTables(); 28 ~CPDF_HintTables();
29 29
30 FX_BOOL GetPagePos(int index, 30 FX_BOOL GetPagePos(int index,
31 FX_FILESIZE& szPageStartPos, 31 FX_FILESIZE& szPageStartPos,
32 FX_FILESIZE& szPageLength, 32 FX_FILESIZE& szPageLength,
33 FX_DWORD& dwObjNum); 33 FX_DWORD& dwObjNum);
34 IPDF_DataAvail::DocAvailStatus CheckPage(int index, 34
35 IFX_DownloadHints* pHints); 35 IPDF_DataAvail::DocAvailStatus CheckPage(
36 int index,
37 IPDF_DataAvail::DownloadHints* pHints);
38
36 FX_BOOL LoadHintStream(CPDF_Stream* pHintStream); 39 FX_BOOL LoadHintStream(CPDF_Stream* pHintStream);
37 40
38 protected: 41 protected:
39 FX_BOOL ReadPageHintTable(CFX_BitStream* hStream); 42 FX_BOOL ReadPageHintTable(CFX_BitStream* hStream);
40 FX_BOOL ReadSharedObjHintTable(CFX_BitStream* hStream, FX_DWORD offset); 43 FX_BOOL ReadSharedObjHintTable(CFX_BitStream* hStream, FX_DWORD offset);
41 FX_DWORD GetItemLength(int index, const std::vector<FX_FILESIZE>& szArray); 44 FX_DWORD GetItemLength(int index, const std::vector<FX_FILESIZE>& szArray);
42 45
43 private: 46 private:
44 int ReadPrimaryHintStreamOffset() const; 47 int ReadPrimaryHintStreamOffset() const;
45 int ReadPrimaryHintStreamLength() const; 48 int ReadPrimaryHintStreamLength() const;
46 49
47 CPDF_Dictionary* m_pLinearizedDict; 50 CPDF_Dictionary* m_pLinearizedDict;
48 CPDF_DataAvail* m_pDataAvail; 51 CPDF_DataAvail* m_pDataAvail;
49 FX_DWORD m_nFirstPageSharedObjs; 52 FX_DWORD m_nFirstPageSharedObjs;
50 FX_FILESIZE m_szFirstPageObjOffset; 53 FX_FILESIZE m_szFirstPageObjOffset;
51 CFX_DWordArray m_dwDeltaNObjsArray; 54 CFX_DWordArray m_dwDeltaNObjsArray;
52 CFX_DWordArray m_dwNSharedObjsArray; 55 CFX_DWordArray m_dwNSharedObjsArray;
53 CFX_DWordArray m_dwSharedObjNumArray; 56 CFX_DWordArray m_dwSharedObjNumArray;
54 CFX_DWordArray m_dwIdentifierArray; 57 CFX_DWordArray m_dwIdentifierArray;
55 std::vector<FX_FILESIZE> m_szPageOffsetArray; 58 std::vector<FX_FILESIZE> m_szPageOffsetArray;
56 std::vector<FX_FILESIZE> m_szSharedObjOffsetArray; 59 std::vector<FX_FILESIZE> m_szSharedObjOffsetArray;
57 }; 60 };
58 61
59 #endif // CORE_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_ 62 #endif // CORE_SRC_FPDFAPI_FPDF_PARSER_CPDF_HINT_TABLES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698