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

Side by Side Diff: core/fxcodec/codec/ccodec_jpegmodule.h

Issue 1876023003: Remove ICodec_* Interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef CORE_FXCODEC_CODEC_CCODEC_JPEGMODULE_H_
8 #define CORE_FXCODEC_CODEC_CCODEC_JPEGMODULE_H_
9
10 #include "core/fxcrt/include/fx_system.h"
11
12 class CCodec_ScanlineDecoder;
13 class CFX_DIBSource;
14
15 #ifdef PDF_ENABLE_XFA
16 class CFX_DIBAttribute;
17 #endif // PDF_ENABLE_XFA
18
19 class CCodec_JpegModule {
20 public:
21 CCodec_JpegModule() {}
22 CCodec_ScanlineDecoder* CreateDecoder(const uint8_t* src_buf,
23 uint32_t src_size,
24 int width,
25 int height,
26 int nComps,
27 FX_BOOL ColorTransform);
28 FX_BOOL LoadInfo(const uint8_t* src_buf,
29 uint32_t src_size,
30 int& width,
31 int& height,
32 int& num_components,
33 int& bits_per_components,
34 FX_BOOL& color_transform,
35 uint8_t** icc_buf_ptr = nullptr,
36 uint32_t* icc_length = nullptr);
37 FX_BOOL Encode(const CFX_DIBSource* pSource,
38 uint8_t*& dest_buf,
39 FX_STRSIZE& dest_size,
40 int quality = 75,
41 const uint8_t* icc_buf = nullptr,
42 uint32_t icc_length = 0);
43 void* Start();
44 void Finish(void* pContext);
45 void Input(void* pContext, const uint8_t* src_buf, uint32_t src_size);
46
47 #ifndef PDF_ENABLE_XFA
48 int ReadHeader(void* pContext, int* width, int* height, int* nComps);
49 #else // PDF_ENABLE_XFA
50 int ReadHeader(void* pContext,
51 int* width,
52 int* height,
53 int* nComps,
54 CFX_DIBAttribute* pAttribute);
55 #endif // PDF_ENABLE_XFA
56
57 int StartScanline(void* pContext, int down_scale);
58 FX_BOOL ReadScanline(void* pContext, uint8_t* dest_buf);
59 uint32_t GetAvailInput(void* pContext, uint8_t** avail_buf_ptr);
60 };
61
62 #endif // CORE_FXCODEC_CODEC_CCODEC_JPEGMODULE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698