summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_parser.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-08-02 17:41:22 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-08-03 01:05:51 +0000
commitd1a8458e6390103e123e9d265040b3d02c16955b (patch)
tree3b169237c62b6b6210722ed403314b52aea34d8f /core/fpdfapi/parser/cpdf_parser.h
parentf44812cf6d7559dd2a0bbc25a684e54675f4794d (diff)
downloadpdfium-d1a8458e6390103e123e9d265040b3d02c16955b.tar.xz
Avoid a redundant header offset check in CPDF_Parser.
CPDF_Parser::StartLinearizedParse() calls StartParse(), but already knows the PDF header offset. Refactor StartParse() so it does not have to look for the header again. Change-Id: Id8cc39301ae72da868dafc53921622d5b28ce26e Reviewed-on: https://pdfium-review.googlesource.com/9830 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Art Snake <art-snake@yandex-team.ru>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_parser.h')
-rw-r--r--core/fpdfapi/parser/cpdf_parser.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_parser.h b/core/fpdfapi/parser/cpdf_parser.h
index 759d042360..189de168f4 100644
--- a/core/fpdfapi/parser/cpdf_parser.h
+++ b/core/fpdfapi/parser/cpdf_parser.h
@@ -153,6 +153,9 @@ class CPDF_Parser {
ObjectInfo info;
};
+ Error StartParseInternal(const CFX_RetainPtr<IFX_SeekableReadStream>& pFile,
+ CPDF_Document* pDocument,
+ int32_t iHeaderOffset);
CPDF_Object* ParseDirect(CPDF_Object* pObj);
bool LoadAllCrossRefV4(FX_FILESIZE pos);
bool LoadAllCrossRefV5(FX_FILESIZE pos);