OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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_SRC_FXCODEC_CODEC_CODEC_INT_H_ | 7 #ifndef CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ |
8 #define CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ | 8 #define CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ |
9 | 9 |
10 #include <limits.h> | 10 #include <limits.h> |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 CFX_BinaryBuf* pTransformKey); | 240 CFX_BinaryBuf* pTransformKey); |
241 | 241 |
242 FX_DWORD m_nComponents; | 242 FX_DWORD m_nComponents; |
243 std::map<CFX_ByteString, CFX_IccTransformCache*> m_MapTranform; | 243 std::map<CFX_ByteString, CFX_IccTransformCache*> m_MapTranform; |
244 std::map<CFX_ByteString, CFX_IccProfileCache*> m_MapProfile; | 244 std::map<CFX_ByteString, CFX_IccProfileCache*> m_MapProfile; |
245 }; | 245 }; |
246 | 246 |
247 class CCodec_JpxModule : public ICodec_JpxModule { | 247 class CCodec_JpxModule : public ICodec_JpxModule { |
248 public: | 248 public: |
249 CCodec_JpxModule(); | 249 CCodec_JpxModule(); |
250 void* CreateDecoder(const uint8_t* src_buf, | 250 ~CCodec_JpxModule() override; |
251 FX_DWORD src_size, | 251 |
252 FX_BOOL useColorSpace = FALSE); | 252 // ICodec_JpxModule: |
253 void GetImageInfo(void* ctx, | 253 CJPX_Decoder* CreateDecoder(const uint8_t* src_buf, |
254 FX_DWORD& width, | 254 FX_DWORD src_size, |
255 FX_DWORD& height, | 255 bool use_colorspace) override; |
256 FX_DWORD& codestream_nComps, | 256 void GetImageInfo(CJPX_Decoder* pDecoder, |
257 FX_DWORD& output_nComps); | 257 FX_DWORD* width, |
258 FX_BOOL Decode(void* ctx, | 258 FX_DWORD* height, |
| 259 FX_DWORD* components) override; |
| 260 FX_BOOL Decode(CJPX_Decoder* pDecoder, |
259 uint8_t* dest_data, | 261 uint8_t* dest_data, |
260 int pitch, | 262 int pitch, |
261 FX_BOOL bTranslateColor, | 263 uint8_t* offsets) override; |
262 uint8_t* offsets); | 264 void DestroyDecoder(CJPX_Decoder* pDecoder) override; |
263 void DestroyDecoder(void* ctx); | |
264 }; | 265 }; |
265 | 266 |
266 class CPDF_Jbig2Interface : public CJBig2_Module { | 267 class CPDF_Jbig2Interface : public CJBig2_Module { |
267 public: | 268 public: |
268 virtual void* JBig2_Malloc(FX_DWORD dwSize) { | 269 virtual void* JBig2_Malloc(FX_DWORD dwSize) { |
269 return FX_Alloc(uint8_t, dwSize); | 270 return FX_Alloc(uint8_t, dwSize); |
270 } | 271 } |
271 virtual void* JBig2_Malloc2(FX_DWORD num, FX_DWORD dwSize) { | 272 virtual void* JBig2_Malloc2(FX_DWORD num, FX_DWORD dwSize) { |
272 if (dwSize && num >= UINT_MAX / dwSize) { | 273 if (dwSize && num >= UINT_MAX / dwSize) { |
273 return NULL; | 274 return NULL; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 OPJ_SIZE_T opj_read_from_memory(void* p_buffer, | 368 OPJ_SIZE_T opj_read_from_memory(void* p_buffer, |
368 OPJ_SIZE_T nb_bytes, | 369 OPJ_SIZE_T nb_bytes, |
369 void* p_user_data); | 370 void* p_user_data); |
370 OPJ_SIZE_T opj_write_from_memory(void* p_buffer, | 371 OPJ_SIZE_T opj_write_from_memory(void* p_buffer, |
371 OPJ_SIZE_T nb_bytes, | 372 OPJ_SIZE_T nb_bytes, |
372 void* p_user_data); | 373 void* p_user_data); |
373 OPJ_OFF_T opj_skip_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); | 374 OPJ_OFF_T opj_skip_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); |
374 OPJ_BOOL opj_seek_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); | 375 OPJ_BOOL opj_seek_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); |
375 | 376 |
376 #endif // CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ | 377 #endif // CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ |
OLD | NEW |