summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_stream.h
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2018-06-06 12:31:18 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-06 12:31:18 +0000
commiteababa10789bc0d73a325291e2854090ee3896cd (patch)
tree67bb315c3e405c622c9fac40f0f473b4ec2b8fc1 /core/fpdfapi/parser/cpdf_stream.h
parentc22d671728605bc614dc84ec6a42a5647808b30d (diff)
downloadpdfium-eababa10789bc0d73a325291e2854090ee3896cd.tar.xz
Use CPDF_StreamAcc to data access of CPDF_Stream.
Change-Id: I68b88e013ac542f245dbe7b6889799c814d46eb8 Reviewed-on: https://pdfium-review.googlesource.com/33690 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_stream.h')
-rw-r--r--core/fpdfapi/parser/cpdf_stream.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/fpdfapi/parser/cpdf_stream.h b/core/fpdfapi/parser/cpdf_stream.h
index cc3dcac227..7e98f300ba 100644
--- a/core/fpdfapi/parser/cpdf_stream.h
+++ b/core/fpdfapi/parser/cpdf_stream.h
@@ -37,7 +37,9 @@ class CPDF_Stream : public CPDF_Object {
bool WriteTo(IFX_ArchiveStream* archive) const override;
uint32_t GetRawSize() const { return m_dwSize; }
- uint8_t* GetRawData() const { return m_pDataBuf.get(); }
+ // Will be null in case when stream is not memory based.
+ // Use CPDF_StreamAcc to data access in all cases.
+ uint8_t* GetInMemoryRawData() const { return m_pDataBuf.get(); }
// Does not takes ownership of |pData|, copies into internally-owned buffer.
void SetData(const uint8_t* pData, uint32_t size);