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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: core/src/fpdfapi/fpdf_parser/parser_int.h
diff --git a/core/src/fpdfapi/fpdf_parser/parser_int.h b/core/src/fpdfapi/fpdf_parser/parser_int.h
new file mode 100644
index 0000000000000000000000000000000000000000..bff33bcede29d548c839a5123138b3ffbc95c3c7
--- /dev/null
+++ b/core/src/fpdfapi/fpdf_parser/parser_int.h
@@ -0,0 +1,44 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
jun_fang 2015/09/21 12:18:08 2015
+
+#ifndef _FPDFAPI_PARSER_INT_H_
+#define _FPDFAPI_PARSER_INT_H_
+
+class CPDF_DataAvail;
+
+class CPDF_HintTables {
+ public:
+ CPDF_HintTables(CPDF_DataAvail* pDataAvail, CPDF_Dictionary* pLinearized)
+ : m_pLinearizedDict(pLinearized),
+ m_pHintStream(nullptr),
+ m_pDataAvail(pDataAvail),
+ m_nFirstPageSharedObjs(0),
+ m_szFirstPageObjOffset(0) {}
+ ~CPDF_HintTables();
+ FX_BOOL GetPagePos(int index,
+ FX_FILESIZE& szPageStartPos,
+ FX_FILESIZE& szPageLength,
+ FX_DWORD& dwObjNum);
+ FX_BOOL CheckPage(int index, IFX_DownloadHints* pHints);
+ FX_BOOL LoadHintStream(CPDF_Stream* pHintStream);
+
+ protected:
+ FX_BOOL ReadPageHintTable(CFX_BitStream& bs);
+ FX_BOOL ReadSharedObjHintTable(CFX_BitStream& bs);
+ FX_DWORD GetItemLength(int index, CFX_FileSizeArray& szArray);
+ CPDF_Dictionary* m_pLinearizedDict;
Tom Sepez 2015/09/22 00:05:39 nit: maybe blank line here between methods and mem
jun_fang 2015/09/22 12:42:32 Acknowledged.
+ CPDF_Stream* m_pHintStream;
+ CPDF_DataAvail* m_pDataAvail;
+ FX_DWORD m_nFirstPageSharedObjs;
+ FX_FILESIZE m_szFirstPageObjOffset;
+ CFX_DWordArray m_dwDeltaNObjsArray;
+ CFX_DWordArray m_dwNSharedObjsArray;
+ CFX_DWordArray m_dwSharedObjNumArray;
+ CFX_DWordArray m_dwIdentifierArray;
+ CFX_FileSizeArray m_szPageOffsetArray;
+ CFX_FileSizeArray m_szSharedObjOffsetArray;
+};
+#endif //_FPDFAPI_PARSER_INT_H_

Powered by Google App Engine
This is Rietveld 408576698