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

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

Issue 1265503005: clang-format all pdfium code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: sigh Created 5 years, 4 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_PROVIDER_H_ 7 #ifndef CORE_INCLUDE_FXCODEC_FX_CODEC_PROVIDER_H_
8 #define CORE_INCLUDE_FXCODEC_FX_CODEC_PROVIDER_H_ 8 #define CORE_INCLUDE_FXCODEC_FX_CODEC_PROVIDER_H_
9 9
10 #include "../fxcrt/fx_system.h" 10 #include "../fxcrt/fx_system.h"
11 11
12 class IFX_JpegProvider 12 class IFX_JpegProvider {
13 { 13 public:
14 public: 14 virtual void Release() = 0;
15 virtual void» » Release() = 0;
16 15
17 virtual void*» » CreateDecoder(const uint8_t* src_buf, FX_DWORD s rc_size, int width, int height, int nComps, FX_BOOL ColorTransform) = 0; 16 virtual void* CreateDecoder(const uint8_t* src_buf,
17 FX_DWORD src_size,
18 int width,
19 int height,
20 int nComps,
21 FX_BOOL ColorTransform) = 0;
18 22
23 virtual void DestroyDecoder(void* pDecoder) = 0;
19 24
20 virtual void» » DestroyDecoder(void* pDecoder) = 0; 25 virtual void DownScale(void* pDecoder, int dest_width, int dest_height) = 0;
21 26
22 virtual void» » DownScale(void* pDecoder, int dest_width, int de st_height) = 0; 27 virtual FX_BOOL Rewind(void* pDecoder) = 0;
23 28
24 virtual FX_BOOL» » Rewind(void* pDecoder) = 0; 29 virtual uint8_t* GetNextLine(void* pDecoder) = 0;
25 30
26 virtual uint8_t*» GetNextLine(void* pDecoder) = 0; 31 virtual FX_DWORD GetSrcOffset(void* pDecoder) = 0;
27 32
28 virtual FX_DWORD» GetSrcOffset(void* pDecoder) = 0; 33 virtual FX_BOOL LoadInfo(const uint8_t* src_buf,
34 FX_DWORD src_size,
35 int& width,
36 int& height,
37 int& num_components,
38 int& bits_per_components,
39 FX_BOOL& color_transform,
40 uint8_t** icc_buf_ptr = NULL,
41 FX_DWORD* icc_length = NULL) = 0;
29 42
43 virtual FX_BOOL Encode(const class CFX_DIBSource* pSource,
44 uint8_t*& dest_buf,
45 FX_STRSIZE& dest_size,
46 int quality = 75,
47 const uint8_t* icc_buf = NULL,
48 FX_DWORD icc_length = 0) = 0;
30 49
31 virtual FX_BOOL» » LoadInfo(const uint8_t* src_buf, FX_DWORD src_si ze, int& width, int& height, 50 virtual void* Start() = 0;
32 int& num_components, int& bits_per_components, FX_BOOL& color_transform,
33 uint8_t** icc_buf_ptr = NULL, FX_DWORD* icc_len gth = NULL) = 0;
34 51
35 virtual FX_BOOL» » Encode(const class CFX_DIBSource* pSource, uint8 _t*& dest_buf, FX_STRSIZE& dest_size, int quality = 75, 52 virtual void Finish(void* pContext) = 0;
36 const uint8_t* icc_buf = NULL, FX_DWORD icc_lengt h = 0) = 0;
37 53
38 virtual void*» » Start() = 0; 54 virtual void Input(void* pContext,
55 const uint8_t* src_buf,
56 FX_DWORD src_size) = 0;
39 57
40 virtual void» » Finish(void* pContext) = 0; 58 virtual int ReadHeader(void* pContext,
59 int* width,
60 int* height,
61 int* nComps) = 0;
41 62
42 virtual void» » Input(void* pContext, const uint8_t* src_buf, FX _DWORD src_size) = 0; 63 virtual int StartScanline(void* pContext, int down_scale) = 0;
43 64
44 virtual int»» » ReadHeader(void* pContext, int* width, int* heig ht, int* nComps) = 0; 65 virtual FX_BOOL ReadScanline(void* pContext, uint8_t* dest_buf) = 0;
45 66
67 virtual FX_DWORD GetAvailInput(void* pContext,
68 uint8_t** avail_buf_ptr = NULL) = 0;
46 69
47 virtual int»» » StartScanline(void* pContext, int down_scale) = 0; 70 protected:
48 71 ~IFX_JpegProvider() {}
49
50 virtual FX_BOOL» » ReadScanline(void* pContext, uint8_t* dest_buf) = 0;
51
52
53 virtual FX_DWORD» GetAvailInput(void* pContext, uint8_t** avail_buf_ptr = NULL) = 0;
54
55 protected:
56 ~IFX_JpegProvider() { }
57 }; 72 };
58 73
59 #endif // CORE_INCLUDE_FXCODEC_FX_CODEC_PROVIDER_H_ 74 #endif // CORE_INCLUDE_FXCODEC_FX_CODEC_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698