OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef CORE_FXCODEC_CODEC_CCODEC_FLATEMODULE_H_ | 7 #ifndef CORE_FXCODEC_CODEC_CCODEC_FLATEMODULE_H_ |
8 #define CORE_FXCODEC_CODEC_CCODEC_FLATEMODULE_H_ | 8 #define CORE_FXCODEC_CODEC_CCODEC_FLATEMODULE_H_ |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "core/fxcrt/fx_system.h" | 12 #include "core/fxcrt/fx_system.h" |
11 | 13 |
12 class CCodec_ScanlineDecoder; | 14 class CCodec_ScanlineDecoder; |
13 | 15 |
14 class CCodec_FlateModule { | 16 class CCodec_FlateModule { |
15 public: | 17 public: |
16 CCodec_ScanlineDecoder* CreateDecoder(const uint8_t* src_buf, | 18 std::unique_ptr<CCodec_ScanlineDecoder> CreateDecoder(const uint8_t* src_buf, |
17 uint32_t src_size, | 19 uint32_t src_size, |
18 int width, | 20 int width, |
19 int height, | 21 int height, |
20 int nComps, | 22 int nComps, |
21 int bpc, | 23 int bpc, |
22 int predictor, | 24 int predictor, |
23 int Colors, | 25 int Colors, |
24 int BitsPerComponent, | 26 int BitsPerComponent, |
25 int Columns); | 27 int Columns); |
26 uint32_t FlateOrLZWDecode(bool bLZW, | 28 uint32_t FlateOrLZWDecode(bool bLZW, |
27 const uint8_t* src_buf, | 29 const uint8_t* src_buf, |
28 uint32_t src_size, | 30 uint32_t src_size, |
29 bool bEarlyChange, | 31 bool bEarlyChange, |
30 int predictor, | 32 int predictor, |
31 int Colors, | 33 int Colors, |
32 int BitsPerComponent, | 34 int BitsPerComponent, |
33 int Columns, | 35 int Columns, |
34 uint32_t estimated_size, | 36 uint32_t estimated_size, |
35 uint8_t*& dest_buf, | 37 uint8_t*& dest_buf, |
36 uint32_t& dest_size); | 38 uint32_t& dest_size); |
37 bool Encode(const uint8_t* src_buf, | 39 bool Encode(const uint8_t* src_buf, |
38 uint32_t src_size, | 40 uint32_t src_size, |
39 uint8_t** dest_buf, | 41 uint8_t** dest_buf, |
40 uint32_t* dest_size); | 42 uint32_t* dest_size); |
41 bool PngEncode(const uint8_t* src_buf, | 43 bool PngEncode(const uint8_t* src_buf, |
42 uint32_t src_size, | 44 uint32_t src_size, |
43 uint8_t** dest_buf, | 45 uint8_t** dest_buf, |
44 uint32_t* dest_size); | 46 uint32_t* dest_size); |
45 }; | 47 }; |
46 | 48 |
47 #endif // CORE_FXCODEC_CODEC_CCODEC_FLATEMODULE_H_ | 49 #endif // CORE_FXCODEC_CODEC_CCODEC_FLATEMODULE_H_ |
OLD | NEW |