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

Side by Side Diff: core/include/fxcodec/fx_codec.h

Issue 1310603006: Cleanup dead code in CPDF_DIBSource::LoadJpxBitmap() and friends. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Revert bad m_pColorSpace logic Created 5 years, 3 months 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
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_INCLUDE_FXCODEC_FX_CODEC_H_ 7 #ifndef CORE_INCLUDE_FXCODEC_FX_CODEC_H_
8 #define CORE_INCLUDE_FXCODEC_FX_CODEC_H_ 8 #define CORE_INCLUDE_FXCODEC_FX_CODEC_H_
9 9
10 #include "../../../third_party/base/nonstd_unique_ptr.h" 10 #include "../../../third_party/base/nonstd_unique_ptr.h"
11 #include "../fxcrt/fx_basic.h" 11 #include "../fxcrt/fx_basic.h"
12 #include "fx_codec_def.h" 12 #include "fx_codec_def.h"
13 #include "fx_codec_provider.h" 13 #include "fx_codec_provider.h"
14 14
15 class CFX_DIBSource; 15 class CFX_DIBSource;
16 class CJPX_Decoder;
16 class ICodec_ScanlineDecoder; 17 class ICodec_ScanlineDecoder;
17 class ICodec_BasicModule; 18 class ICodec_BasicModule;
18 class ICodec_FaxModule; 19 class ICodec_FaxModule;
19 class ICodec_JpegModule; 20 class ICodec_JpegModule;
20 class ICodec_JpxModule; 21 class ICodec_JpxModule;
21 class ICodec_Jbig2Module; 22 class ICodec_Jbig2Module;
22 class ICodec_IccModule; 23 class ICodec_IccModule;
23 class ICodec_FlateModule; 24 class ICodec_FlateModule;
24 class ICodec_Jbig2Encoder; 25 class ICodec_Jbig2Encoder;
25 class ICodec_ScanlineDecoder; 26 class ICodec_ScanlineDecoder;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 int* height, 190 int* height,
190 int* nComps) = 0; 191 int* nComps) = 0;
191 192
192 virtual int StartScanline(void* pContext, int down_scale) = 0; 193 virtual int StartScanline(void* pContext, int down_scale) = 0;
193 194
194 virtual FX_BOOL ReadScanline(void* pContext, uint8_t* dest_buf) = 0; 195 virtual FX_BOOL ReadScanline(void* pContext, uint8_t* dest_buf) = 0;
195 196
196 virtual FX_DWORD GetAvailInput(void* pContext, 197 virtual FX_DWORD GetAvailInput(void* pContext,
197 uint8_t** avail_buf_ptr = NULL) = 0; 198 uint8_t** avail_buf_ptr = NULL) = 0;
198 }; 199 };
200
199 class ICodec_JpxModule { 201 class ICodec_JpxModule {
200 public: 202 public:
201 virtual ~ICodec_JpxModule() {} 203 virtual ~ICodec_JpxModule() {}
202 204
203 virtual void* CreateDecoder(const uint8_t* src_buf, 205 virtual CJPX_Decoder* CreateDecoder(const uint8_t* src_buf,
204 FX_DWORD src_size, 206 FX_DWORD src_size,
205 FX_BOOL useColorSpace = FALSE) = 0; 207 bool use_colorspace) = 0;
206 208
207 virtual void GetImageInfo(void* ctx, 209 virtual void GetImageInfo(CJPX_Decoder* pDecoder,
208 FX_DWORD& width, 210 FX_DWORD* width,
209 FX_DWORD& height, 211 FX_DWORD* height,
210 FX_DWORD& codestream_nComps, 212 FX_DWORD* components) = 0;
211 FX_DWORD& output_nComps) = 0;
212 213
213 virtual FX_BOOL Decode(void* ctx, 214 virtual FX_BOOL Decode(CJPX_Decoder* pDecoder,
214 uint8_t* dest_data, 215 uint8_t* dest_data,
215 int pitch, 216 int pitch,
216 FX_BOOL bTranslateColor,
217 uint8_t* offsets) = 0; 217 uint8_t* offsets) = 0;
218 218
219 virtual void DestroyDecoder(void* ctx) = 0; 219 virtual void DestroyDecoder(CJPX_Decoder* pDecoder) = 0;
220 }; 220 };
221
221 class ICodec_Jbig2Module { 222 class ICodec_Jbig2Module {
222 public: 223 public:
223 virtual ~ICodec_Jbig2Module() {} 224 virtual ~ICodec_Jbig2Module() {}
224 225
225 virtual FX_BOOL Decode(FX_DWORD width, 226 virtual FX_BOOL Decode(FX_DWORD width,
226 FX_DWORD height, 227 FX_DWORD height,
227 const uint8_t* src_buf, 228 const uint8_t* src_buf,
228 FX_DWORD src_size, 229 FX_DWORD src_size,
229 const uint8_t* global_data, 230 const uint8_t* global_data,
230 FX_DWORD global_size, 231 FX_DWORD global_size,
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 void AdobeCMYK_to_sRGB1(uint8_t c, 346 void AdobeCMYK_to_sRGB1(uint8_t c,
346 uint8_t m, 347 uint8_t m,
347 uint8_t y, 348 uint8_t y,
348 uint8_t k, 349 uint8_t k,
349 uint8_t& R, 350 uint8_t& R,
350 uint8_t& G, 351 uint8_t& G,
351 uint8_t& B); 352 uint8_t& B);
352 FX_BOOL MD5ComputeID(const void* buf, FX_DWORD dwSize, uint8_t ID[16]); 353 FX_BOOL MD5ComputeID(const void* buf, FX_DWORD dwSize, uint8_t ID[16]);
353 354
354 #endif // CORE_INCLUDE_FXCODEC_FX_CODEC_H_ 355 #endif // CORE_INCLUDE_FXCODEC_FX_CODEC_H_
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp » ('j') | core/src/fxcodec/codec/fx_codec_jpx_opj.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698