diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-28 22:25:49 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-28 22:25:49 +0000 |
commit | 126927eaec336153e3be43086deee672829395f1 (patch) | |
tree | 1d00d1ad571fcc412fac54433b4061d36b570beb /core/fxcodec/codec/ccodec_jpegmodule.h | |
parent | 4d92af5ace491a2e87a6c73e5afa9ed53ac86bd0 (diff) | |
download | pdfium-126927eaec336153e3be43086deee672829395f1.tar.xz |
Use std::span<> in CCodec_JPEGModule
Also rename .cpp file to match class name and .h file.
Modify some helper functions to operate on spans.
Move some initializations to member declarations.
Change-Id: Ie0889bda91daaef80fae6f5681f8ce068e92453b
Reviewed-on: https://pdfium-review.googlesource.com/41534
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/ccodec_jpegmodule.h')
-rw-r--r-- | core/fxcodec/codec/ccodec_jpegmodule.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/core/fxcodec/codec/ccodec_jpegmodule.h b/core/fxcodec/codec/ccodec_jpegmodule.h index d990ee938f..fb116f5d88 100644 --- a/core/fxcodec/codec/ccodec_jpegmodule.h +++ b/core/fxcodec/codec/ccodec_jpegmodule.h @@ -12,6 +12,7 @@ #include "core/fxcrt/fx_system.h" #include "core/fxcrt/retain_ptr.h" +#include "third_party/base/span.h" class CCodec_ScanlineDecoder; class CFX_DIBBase; @@ -28,14 +29,14 @@ class CCodec_JpegModule { virtual jmp_buf* GetJumpMark() = 0; }; - std::unique_ptr<CCodec_ScanlineDecoder> CreateDecoder(const uint8_t* src_buf, - uint32_t src_size, - int width, - int height, - int nComps, - bool ColorTransform); - bool LoadInfo(const uint8_t* src_buf, - uint32_t src_size, + std::unique_ptr<CCodec_ScanlineDecoder> CreateDecoder( + pdfium::span<const uint8_t> src_buf, + int width, + int height, + int nComps, + bool ColorTransform); + + bool LoadInfo(pdfium::span<const uint8_t> src_span, int* width, int* height, int* num_components, |