OLD | NEW |
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_FPDFAPI_RENDER_RENDER_INT_H_ | 7 #ifndef CORE_FPDFAPI_RENDER_RENDER_INT_H_ |
8 #define CORE_FPDFAPI_RENDER_RENDER_INT_H_ | 8 #define CORE_FPDFAPI_RENDER_RENDER_INT_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 class CPDF_Type3Char; | 49 class CPDF_Type3Char; |
50 class CPDF_Type3Font; | 50 class CPDF_Type3Font; |
51 | 51 |
52 typedef struct { | 52 typedef struct { |
53 FX_FLOAT m_DecodeMin; | 53 FX_FLOAT m_DecodeMin; |
54 FX_FLOAT m_DecodeStep; | 54 FX_FLOAT m_DecodeStep; |
55 int m_ColorKeyMin; | 55 int m_ColorKeyMin; |
56 int m_ColorKeyMax; | 56 int m_ColorKeyMax; |
57 } DIB_COMP_DATA; | 57 } DIB_COMP_DATA; |
58 | 58 |
| 59 #define FPDF_HUGE_IMAGE_SIZE 60000000 |
| 60 |
59 class CPDF_DIBSource : public CFX_DIBSource { | 61 class CPDF_DIBSource : public CFX_DIBSource { |
60 public: | 62 public: |
61 CPDF_DIBSource(); | 63 CPDF_DIBSource(); |
62 ~CPDF_DIBSource() override; | 64 ~CPDF_DIBSource() override; |
63 | 65 |
64 bool Load(CPDF_Document* pDoc, | 66 bool Load(CPDF_Document* pDoc, |
65 const CPDF_Stream* pStream, | 67 const CPDF_Stream* pStream, |
66 CPDF_DIBSource** ppMask, | 68 CPDF_DIBSource** ppMask, |
67 uint32_t* pMatteColor, | 69 uint32_t* pMatteColor, |
68 CPDF_Dictionary* pFormResources, | 70 CPDF_Dictionary* pFormResources, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 uint8_t* m_pMaskedLine; | 168 uint8_t* m_pMaskedLine; |
167 std::unique_ptr<CFX_DIBitmap> m_pCachedBitmap; | 169 std::unique_ptr<CFX_DIBitmap> m_pCachedBitmap; |
168 std::unique_ptr<CCodec_ScanlineDecoder> m_pDecoder; | 170 std::unique_ptr<CCodec_ScanlineDecoder> m_pDecoder; |
169 CPDF_DIBSource* m_pMask; | 171 CPDF_DIBSource* m_pMask; |
170 std::unique_ptr<CPDF_StreamAcc> m_pGlobalStream; | 172 std::unique_ptr<CPDF_StreamAcc> m_pGlobalStream; |
171 std::unique_ptr<CCodec_Jbig2Context> m_pJbig2Context; | 173 std::unique_ptr<CCodec_Jbig2Context> m_pJbig2Context; |
172 CPDF_Stream* m_pMaskStream; | 174 CPDF_Stream* m_pMaskStream; |
173 int m_Status; | 175 int m_Status; |
174 }; | 176 }; |
175 | 177 |
176 #define FPDF_HUGE_IMAGE_SIZE 60000000 | 178 CCodec_ScanlineDecoder* FPDFAPI_CreateFlateDecoder( |
177 class CPDF_DIBTransferFunc : public CFX_FilteredDIB { | 179 const uint8_t* src_buf, |
178 public: | 180 uint32_t src_size, |
179 explicit CPDF_DIBTransferFunc(const CPDF_TransferFunc* pTransferFunc); | 181 int width, |
180 ~CPDF_DIBTransferFunc() override; | 182 int height, |
181 | 183 int nComps, |
182 // CFX_FilteredDIB | 184 int bpc, |
183 FXDIB_Format GetDestFormat() override; | 185 const CPDF_Dictionary* pParams); |
184 FX_ARGB* GetDestPalette() override; | |
185 void TranslateScanline(const uint8_t* src_buf, | |
186 std::vector<uint8_t>* dest_buf) const override; | |
187 void TranslateDownSamples(uint8_t* dest_buf, | |
188 const uint8_t* src_buf, | |
189 int pixels, | |
190 int Bpp) const override; | |
191 | |
192 const uint8_t* m_RampR; | |
193 const uint8_t* m_RampG; | |
194 const uint8_t* m_RampB; | |
195 }; | |
196 | 186 |
197 #endif // CORE_FPDFAPI_RENDER_RENDER_INT_H_ | 187 #endif // CORE_FPDFAPI_RENDER_RENDER_INT_H_ |
OLD | NEW |