diff options
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r-- | core/fpdfapi/parser/fpdf_parser_decode.cpp | 14 | ||||
-rw-r--r-- | core/fpdfapi/parser/fpdf_parser_decode.h | 6 |
2 files changed, 8 insertions, 12 deletions
diff --git a/core/fpdfapi/parser/fpdf_parser_decode.cpp b/core/fpdfapi/parser/fpdf_parser_decode.cpp index 063d21ae5f..ff4f63f0cb 100644 --- a/core/fpdfapi/parser/fpdf_parser_decode.cpp +++ b/core/fpdfapi/parser/fpdf_parser_decode.cpp @@ -258,8 +258,7 @@ uint32_t RunLengthDecode(const uint8_t* src_buf, } std::unique_ptr<CCodec_ScanlineDecoder> FPDFAPI_CreateFaxDecoder( - const uint8_t* src_buf, - uint32_t src_size, + pdfium::span<const uint8_t> src_span, int width, int height, const CPDF_Dictionary* pParams) { @@ -280,13 +279,12 @@ std::unique_ptr<CCodec_ScanlineDecoder> FPDFAPI_CreateFaxDecoder( Rows = 0; } return CPDF_ModuleMgr::Get()->GetFaxModule()->CreateDecoder( - src_buf, src_size, width, height, K, EndOfLine, ByteAlign, BlackIs1, - Columns, Rows); + src_span, width, height, K, EndOfLine, ByteAlign, BlackIs1, Columns, + Rows); } std::unique_ptr<CCodec_ScanlineDecoder> FPDFAPI_CreateFlateDecoder( - const uint8_t* src_buf, - uint32_t src_size, + pdfium::span<const uint8_t> src_span, int width, int height, int nComps, @@ -305,8 +303,8 @@ std::unique_ptr<CCodec_ScanlineDecoder> FPDFAPI_CreateFlateDecoder( return nullptr; } return CPDF_ModuleMgr::Get()->GetFlateModule()->CreateDecoder( - src_buf, src_size, width, height, nComps, bpc, predictor, Colors, - BitsPerComponent, Columns); + src_span, width, height, nComps, bpc, predictor, Colors, BitsPerComponent, + Columns); } uint32_t FPDFAPI_FlateOrLZWDecode(bool bLZW, diff --git a/core/fpdfapi/parser/fpdf_parser_decode.h b/core/fpdfapi/parser/fpdf_parser_decode.h index 652299992a..bf70997397 100644 --- a/core/fpdfapi/parser/fpdf_parser_decode.h +++ b/core/fpdfapi/parser/fpdf_parser_decode.h @@ -39,15 +39,13 @@ uint32_t RunLengthDecode(const uint8_t* src_buf, uint32_t* dest_size); std::unique_ptr<CCodec_ScanlineDecoder> FPDFAPI_CreateFaxDecoder( - const uint8_t* src_buf, - uint32_t src_size, + pdfium::span<const uint8_t> src_span, int width, int height, const CPDF_Dictionary* pParams); std::unique_ptr<CCodec_ScanlineDecoder> FPDFAPI_CreateFlateDecoder( - const uint8_t* src_buf, - uint32_t src_size, + pdfium::span<const uint8_t> src_span, int width, int height, int nComps, |