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

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

Issue 2572843002: Return unique_ptr<>s from fxcodec/ (Closed)
Patch Set: std::move it Created 4 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
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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_FXCODEC_CODEC_CCODEC_JPEGMODULE_H_ 7 #ifndef CORE_FXCODEC_CODEC_CCODEC_JPEGMODULE_H_
8 #define CORE_FXCODEC_CODEC_CCODEC_JPEGMODULE_H_ 8 #define CORE_FXCODEC_CODEC_CCODEC_JPEGMODULE_H_
9 9
10 #include <memory>
11
10 #include "core/fxcrt/fx_system.h" 12 #include "core/fxcrt/fx_system.h"
11 13
12 class CCodec_ScanlineDecoder; 14 class CCodec_ScanlineDecoder;
13 class CFX_DIBSource; 15 class CFX_DIBSource;
14 struct FXJPEG_Context; 16 struct FXJPEG_Context;
15 17
16 #ifdef PDF_ENABLE_XFA 18 #ifdef PDF_ENABLE_XFA
17 class CFX_DIBAttribute; 19 class CFX_DIBAttribute;
18 #endif // PDF_ENABLE_XFA 20 #endif // PDF_ENABLE_XFA
19 21
20 class CCodec_JpegModule { 22 class CCodec_JpegModule {
21 public: 23 public:
22 CCodec_JpegModule() {} 24 CCodec_JpegModule() {}
23 25
24 CCodec_ScanlineDecoder* CreateDecoder(const uint8_t* src_buf, 26 std::unique_ptr<CCodec_ScanlineDecoder> CreateDecoder(const uint8_t* src_buf,
25 uint32_t src_size, 27 uint32_t src_size,
26 int width, 28 int width,
27 int height, 29 int height,
28 int nComps, 30 int nComps,
29 bool ColorTransform); 31 bool ColorTransform);
30 bool LoadInfo(const uint8_t* src_buf, 32 bool LoadInfo(const uint8_t* src_buf,
31 uint32_t src_size, 33 uint32_t src_size,
32 int* width, 34 int* width,
33 int* height, 35 int* height,
34 int* num_components, 36 int* num_components,
35 int* bits_per_components, 37 int* bits_per_components,
36 bool* color_transform); 38 bool* color_transform);
37 FXJPEG_Context* Start(); 39 FXJPEG_Context* Start();
38 void Finish(FXJPEG_Context* pContext); 40 void Finish(FXJPEG_Context* pContext);
39 void Input(FXJPEG_Context* pContext, 41 void Input(FXJPEG_Context* pContext,
(...skipping 12 matching lines...) Expand all
52 int* nComps, 54 int* nComps,
53 CFX_DIBAttribute* pAttribute); 55 CFX_DIBAttribute* pAttribute);
54 #endif // PDF_ENABLE_XFA 56 #endif // PDF_ENABLE_XFA
55 57
56 bool StartScanline(FXJPEG_Context* pContext, int down_scale); 58 bool StartScanline(FXJPEG_Context* pContext, int down_scale);
57 bool ReadScanline(FXJPEG_Context* pContext, uint8_t* dest_buf); 59 bool ReadScanline(FXJPEG_Context* pContext, uint8_t* dest_buf);
58 uint32_t GetAvailInput(FXJPEG_Context* pContext, uint8_t** avail_buf_ptr); 60 uint32_t GetAvailInput(FXJPEG_Context* pContext, uint8_t** avail_buf_ptr);
59 }; 61 };
60 62
61 #endif // CORE_FXCODEC_CODEC_CCODEC_JPEGMODULE_H_ 63 #endif // CORE_FXCODEC_CODEC_CCODEC_JPEGMODULE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698