Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(611)

Side by Side Diff: core/src/fxcodec/codec/codec_int.h

Issue 1477663003: Manual fixups to PDF_ENABLE_XFA in core/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Same as master Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/src/fpdftext/text_int.h ('k') | core/src/fxcodec/codec/fx_codec.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 int quality, 182 int quality,
183 const uint8_t* icc_buf, 183 const uint8_t* icc_buf,
184 FX_DWORD icc_length) override; 184 FX_DWORD icc_length) override;
185 void* Start() override; 185 void* Start() override;
186 void Finish(void* pContext) override; 186 void Finish(void* pContext) override;
187 void Input(void* pContext, 187 void Input(void* pContext,
188 const uint8_t* src_buf, 188 const uint8_t* src_buf,
189 FX_DWORD src_size) override; 189 FX_DWORD src_size) override;
190 #ifndef PDF_ENABLE_XFA 190 #ifndef PDF_ENABLE_XFA
191 int ReadHeader(void* pContext, int* width, int* height, int* nComps) override; 191 int ReadHeader(void* pContext, int* width, int* height, int* nComps) override;
192 #else 192 #else // PDF_ENABLE_XFA
193 int ReadHeader(void* pContext, 193 int ReadHeader(void* pContext,
194 int* width, 194 int* width,
195 int* height, 195 int* height,
196 int* nComps, 196 int* nComps,
197 CFX_DIBAttribute* pAttribute) override; 197 CFX_DIBAttribute* pAttribute) override;
198 #endif 198 #endif // PDF_ENABLE_XFA
199 int StartScanline(void* pContext, int down_scale) override; 199 int StartScanline(void* pContext, int down_scale) override;
200 FX_BOOL ReadScanline(void* pContext, uint8_t* dest_buf) override; 200 FX_BOOL ReadScanline(void* pContext, uint8_t* dest_buf) override;
201 FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr) override; 201 FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr) override;
202 }; 202 };
203
203 #ifdef PDF_ENABLE_XFA 204 #ifdef PDF_ENABLE_XFA
204 #define PNG_ERROR_SIZE 256 205 #define PNG_ERROR_SIZE 256
205 class CCodec_PngModule : public ICodec_PngModule { 206 class CCodec_PngModule : public ICodec_PngModule {
206 public: 207 public:
207 CCodec_PngModule() { FXSYS_memset(m_szLastError, '\0', PNG_ERROR_SIZE); } 208 CCodec_PngModule() { FXSYS_memset(m_szLastError, '\0', PNG_ERROR_SIZE); }
208 209
209 virtual void* Start(void* pModule); 210 virtual void* Start(void* pModule);
210 virtual void Finish(void* pContext); 211 virtual void Finish(void* pContext);
211 virtual FX_BOOL Input(void* pContext, 212 virtual FX_BOOL Input(void* pContext,
212 const uint8_t* src_buf, 213 const uint8_t* src_buf,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 FX_BOOL* tb_flag, 257 FX_BOOL* tb_flag,
257 int32_t* components, 258 int32_t* components,
258 int32_t* pal_num, 259 int32_t* pal_num,
259 FX_DWORD** pal_pp, 260 FX_DWORD** pal_pp,
260 CFX_DIBAttribute* pAttribute) override; 261 CFX_DIBAttribute* pAttribute) override;
261 int32_t LoadImage(void* pContext) override; 262 int32_t LoadImage(void* pContext) override;
262 263
263 protected: 264 protected:
264 FX_CHAR m_szLastError[256]; 265 FX_CHAR m_szLastError[256];
265 }; 266 };
266 #endif 267 #endif // PDF_ENABLE_XFA
268
267 class CCodec_IccModule : public ICodec_IccModule { 269 class CCodec_IccModule : public ICodec_IccModule {
268 public: 270 public:
269 ~CCodec_IccModule() override; 271 ~CCodec_IccModule() override;
270 272
271 // ICodec_IccModule: 273 // ICodec_IccModule:
272 IccCS GetProfileCS(const uint8_t* pProfileData, 274 IccCS GetProfileCS(const uint8_t* pProfileData,
273 unsigned int dwProfileSize) override; 275 unsigned int dwProfileSize) override;
274 IccCS GetProfileCS(IFX_FileRead* pFile) override; 276 IccCS GetProfileCS(IFX_FileRead* pFile) override;
275 void* CreateTransform(ICodec_IccModule::IccParam* pInputParam, 277 void* CreateTransform(ICodec_IccModule::IccParam* pInputParam,
276 ICodec_IccModule::IccParam* pOutputParam, 278 ICodec_IccModule::IccParam* pOutputParam,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 FX_DWORD& height, 356 FX_DWORD& height,
355 FX_DWORD& comps, 357 FX_DWORD& comps,
356 FX_DWORD& bpc, 358 FX_DWORD& bpc,
357 CFX_DIBAttribute* pAttribute) override; 359 CFX_DIBAttribute* pAttribute) override;
358 FX_BOOL Decode(void* ctx, class CFX_DIBitmap* pDIBitmap) override; 360 FX_BOOL Decode(void* ctx, class CFX_DIBitmap* pDIBitmap) override;
359 void DestroyDecoder(void* ctx) override; 361 void DestroyDecoder(void* ctx) override;
360 362
361 protected: 363 protected:
362 ~CCodec_TiffModule() override {} 364 ~CCodec_TiffModule() override {}
363 }; 365 };
366 #endif // PDF_ENABLE_XFA
364 367
365 #endif
366 class CCodec_Jbig2Context { 368 class CCodec_Jbig2Context {
367 public: 369 public:
368 CCodec_Jbig2Context(); 370 CCodec_Jbig2Context();
369 ~CCodec_Jbig2Context() {} 371 ~CCodec_Jbig2Context() {}
370 372
371 FX_DWORD m_width; 373 FX_DWORD m_width;
372 FX_DWORD m_height; 374 FX_DWORD m_height;
373 CPDF_StreamAcc* m_pGlobalStream; 375 CPDF_StreamAcc* m_pGlobalStream;
374 CPDF_StreamAcc* m_pSrcStream; 376 CPDF_StreamAcc* m_pSrcStream;
375 uint8_t* m_dest_buf; 377 uint8_t* m_dest_buf;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 OPJ_SIZE_T opj_read_from_memory(void* p_buffer, 416 OPJ_SIZE_T opj_read_from_memory(void* p_buffer,
415 OPJ_SIZE_T nb_bytes, 417 OPJ_SIZE_T nb_bytes,
416 void* p_user_data); 418 void* p_user_data);
417 OPJ_SIZE_T opj_write_from_memory(void* p_buffer, 419 OPJ_SIZE_T opj_write_from_memory(void* p_buffer,
418 OPJ_SIZE_T nb_bytes, 420 OPJ_SIZE_T nb_bytes,
419 void* p_user_data); 421 void* p_user_data);
420 OPJ_OFF_T opj_skip_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); 422 OPJ_OFF_T opj_skip_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data);
421 OPJ_BOOL opj_seek_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); 423 OPJ_BOOL opj_seek_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data);
422 424
423 #endif // CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ 425 #endif // CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_
OLDNEW
« no previous file with comments | « core/src/fpdftext/text_int.h ('k') | core/src/fxcodec/codec/fx_codec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698