diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-10-09 19:44:11 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-09 19:44:11 +0000 |
commit | 3e838a75ae5c0bb0e524f745df69e54a021fc5ec (patch) | |
tree | 92d389fbba456469c14e75d7723493dc85603b81 /core/fxcodec/bmp/cfx_bmpdecompressor.cpp | |
parent | 78606af0550f34a41d262e0a01381f48b7dfe197 (diff) | |
download | pdfium-3e838a75ae5c0bb0e524f745df69e54a021fc5ec.tar.xz |
Pass CFX_CodecMemory in place of spans to codecs.
Next step towards making CFX_CodecMemory own the memory it is
ref-counting.
Change-Id: I5922d80d13032c3ea028447c47d34a10234109a3
Reviewed-on: https://pdfium-review.googlesource.com/c/43630
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec/bmp/cfx_bmpdecompressor.cpp')
-rw-r--r-- | core/fxcodec/bmp/cfx_bmpdecompressor.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/fxcodec/bmp/cfx_bmpdecompressor.cpp b/core/fxcodec/bmp/cfx_bmpdecompressor.cpp index de97c6d527..35b76f2343 100644 --- a/core/fxcodec/bmp/cfx_bmpdecompressor.cpp +++ b/core/fxcodec/bmp/cfx_bmpdecompressor.cpp @@ -8,6 +8,7 @@ #include <algorithm> #include <limits> +#include <utility> #include "core/fxcodec/bmp/cfx_bmpcontext.h" #include "core/fxcrt/fx_safe_types.h" @@ -659,8 +660,9 @@ void CFX_BmpDecompressor::SaveDecodingStatus(int32_t status) { decode_status_ = status; } -void CFX_BmpDecompressor::SetInputBuffer(pdfium::span<uint8_t> src_buf) { - input_buffer_ = pdfium::MakeRetain<CFX_CodecMemory>(src_buf); +void CFX_BmpDecompressor::SetInputBuffer( + RetainPtr<CFX_CodecMemory> codec_memory) { + input_buffer_ = std::move(codec_memory); } FX_FILESIZE CFX_BmpDecompressor::GetAvailInput() const { |