diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-07-06 17:28:46 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-06 17:28:46 +0000 |
commit | dd1083b47c029d2540aceb246bf80f549781f62f (patch) | |
tree | 7e67b3daeb837eb50c5d72e99cf067538ce7df2c /core/fpdfapi/edit/cpdf_flateencoder.h | |
parent | e3c4b205572eff5f12900f87d612f14a460e4997 (diff) | |
download | pdfium-dd1083b47c029d2540aceb246bf80f549781f62f.tar.xz |
Revert "Avoid duplicate data buffering in CPDF_SyntaxParser::ReadStream()."
This reverts commit 77f15f7883638a4ced131d74c053af10a5970ce9.
Reason for revert: Causes crbug.com/860210
Bug: chromium:860210
Original change's description:
> Avoid duplicate data buffering in CPDF_SyntaxParser::ReadStream().
>
> Allow sub-streams created from an IFX_SeekableReadStream to provide
> stream data without copying memory.
> The data will only reside in the top-level stream.
>
> For example:
> For file
> http://www.major-landrover.ru/upload/attachments/f/9/f96aab07dab04ae89c8a509ec1ef2b31.pdf
> (18 Mb)
>
> The memory usage is reduced by ~13 Mb.
>
> Change-Id: I2595c014d0fbe1fdd181cc04965cfd7d901c2d88
> Reviewed-on: https://pdfium-review.googlesource.com/35930
> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
> Reviewed-by: dsinclair <dsinclair@chromium.org>
TBR=tsepez@chromium.org,dsinclair@chromium.org,art-snake@yandex-team.ru
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I947fca17052765935a952a4f25ca48f6599c4af9
Reviewed-on: https://pdfium-review.googlesource.com/37210
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fpdfapi/edit/cpdf_flateencoder.h')
-rw-r--r-- | core/fpdfapi/edit/cpdf_flateencoder.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/edit/cpdf_flateencoder.h b/core/fpdfapi/edit/cpdf_flateencoder.h index 14ca7cec16..05633f6814 100644 --- a/core/fpdfapi/edit/cpdf_flateencoder.h +++ b/core/fpdfapi/edit/cpdf_flateencoder.h @@ -34,14 +34,14 @@ class CPDF_FlateEncoder { } private: - RetainPtr<CPDF_StreamAcc> m_pAcc; - uint32_t m_dwSize; MaybeOwned<uint8_t, FxFreeDeleter> m_pData; // Only one of these two pointers is valid at any time. UnownedPtr<const CPDF_Dictionary> m_pDict; std::unique_ptr<CPDF_Dictionary> m_pClonedDict; + + RetainPtr<CPDF_StreamAcc> m_pAcc; }; #endif // CORE_FPDFAPI_EDIT_CPDF_FLATEENCODER_H_ |