diff options
Diffstat (limited to 'core/fxcodec/bmp')
-rw-r--r-- | core/fxcodec/bmp/cfx_bmpdecompressor.cpp | 6 | ||||
-rw-r--r-- | core/fxcodec/bmp/cfx_bmpdecompressor.h | 2 |
2 files changed, 5 insertions, 3 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 { diff --git a/core/fxcodec/bmp/cfx_bmpdecompressor.h b/core/fxcodec/bmp/cfx_bmpdecompressor.h index beaf9bf78a..53d52ae14c 100644 --- a/core/fxcodec/bmp/cfx_bmpdecompressor.h +++ b/core/fxcodec/bmp/cfx_bmpdecompressor.h @@ -25,7 +25,7 @@ class CFX_BmpDecompressor { void Error(); int32_t DecodeImage(); int32_t ReadHeader(); - void SetInputBuffer(pdfium::span<uint8_t> src_buf); + void SetInputBuffer(RetainPtr<CFX_CodecMemory> codec_memory); FX_FILESIZE GetAvailInput() const; jmp_buf jmpbuf_; |