diff options
author | Lei Zhang <thestig@chromium.org> | 2018-08-13 20:36:16 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-13 20:36:16 +0000 |
commit | d801c9c9caddf3941f6844fab58b19261d7d3cad (patch) | |
tree | 745db126f620e06dadab32fd71ead7bc8ca2dede /core/fxcrt | |
parent | 30029419ad4b9e5cd382767a8645677afbeff7fd (diff) | |
download | pdfium-d801c9c9caddf3941f6844fab58b19261d7d3cad.tar.xz |
Implement CFX_CodecMemory.
This class is much simpler than CFX_MemoryStream and does only what
CFX_BmpDecompressor and CFX_GifContext needs. Swap out CFX_MemoryStream
and remove CFX_MemoryStream::Seek().
BUG=pdfium:263
Change-Id: Ifd8ce4d2b6c9fedd6ec842d46f54fc8e654fbca7
Reviewed-on: https://pdfium-review.googlesource.com/39880
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcrt')
-rw-r--r-- | core/fxcrt/cfx_memorystream.cpp | 8 | ||||
-rw-r--r-- | core/fxcrt/cfx_memorystream.h | 3 |
2 files changed, 0 insertions, 11 deletions
diff --git a/core/fxcrt/cfx_memorystream.cpp b/core/fxcrt/cfx_memorystream.cpp index 8073d375da..15cde78f42 100644 --- a/core/fxcrt/cfx_memorystream.cpp +++ b/core/fxcrt/cfx_memorystream.cpp @@ -146,14 +146,6 @@ bool CFX_MemoryStream::WriteBlock(const void* buffer, return true; } -bool CFX_MemoryStream::Seek(size_t pos) { - if (pos > m_nCurSize) - return false; - - m_nCurPos = pos; - return true; -} - bool CFX_MemoryStream::ExpandBlocks(size_t size) { m_nCurSize = std::max(m_nCurSize, size); if (size <= m_nTotalSize) diff --git a/core/fxcrt/cfx_memorystream.h b/core/fxcrt/cfx_memorystream.h index 3726b897c4..cd89c629fc 100644 --- a/core/fxcrt/cfx_memorystream.h +++ b/core/fxcrt/cfx_memorystream.h @@ -26,9 +26,6 @@ class CFX_MemoryStream : public IFX_SeekableStream { bool WriteBlock(const void* buffer, FX_FILESIZE offset, size_t size) override; bool Flush() override; - // Sets the cursor position to |pos| if possible - bool Seek(size_t pos); - uint8_t* GetBuffer() { return !m_Blocks.empty() ? m_Blocks.front() : nullptr; } |