summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_contentparser.h
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-06-04 19:30:07 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-04 19:30:07 +0000
commit9d3fb11a985a8f2aefbf361c0030c7bce2248b8e (patch)
tree480981ed5cd632001143485a91328287b8ba0cdb /core/fpdfapi/page/cpdf_contentparser.h
parentad978ed196882ce29e6a4e0757770da6cfc44f81 (diff)
downloadpdfium-9d3fb11a985a8f2aefbf361c0030c7bce2248b8e.tar.xz
Do not merge content streams to parse them.
Removed the PrepareContent() step in CPDF_ContentParser, as its goal was to merge these streams. In Parse(), now loop through the m_StreamArray and parse each stream separately. Bug: pdfium:1051 Change-Id: Id07f3efe766828081c8cf8601bf69c4f37e20e13 Reviewed-on: https://pdfium-review.googlesource.com/33595 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_contentparser.h')
-rw-r--r--core/fpdfapi/page/cpdf_contentparser.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/core/fpdfapi/page/cpdf_contentparser.h b/core/fpdfapi/page/cpdf_contentparser.h
index f9b491defa..92a3e06890 100644
--- a/core/fpdfapi/page/cpdf_contentparser.h
+++ b/core/fpdfapi/page/cpdf_contentparser.h
@@ -42,26 +42,22 @@ class CPDF_ContentParser {
private:
enum class Stage : uint8_t {
kGetContent = 1,
- kPrepareContent,
kParse,
kCheckClip,
kComplete,
};
Stage GetContent();
- Stage PrepareContent();
Stage Parse();
Stage CheckClip();
Stage m_CurrentStage;
UnownedPtr<CPDF_PageObjectHolder> const m_pObjectHolder;
UnownedPtr<CPDF_Type3Char> m_pType3Char; // Only used when parsing forms.
- RetainPtr<CPDF_StreamAcc> m_pSingleStream;
std::vector<RetainPtr<CPDF_StreamAcc>> m_StreamArray;
- MaybeOwned<uint8_t, FxFreeDeleter> m_pData;
uint32_t m_nStreams = 0;
- uint32_t m_Size = 0;
uint32_t m_CurrentOffset = 0;
+ uint32_t m_CurrentStream = 0;
// Only used when parsing pages.
std::unique_ptr<std::set<const uint8_t*>> m_parsedSet;