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_INCLUDE_FPDFAPI_FPDF_RENDER_H_ | 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_ |
8 #define CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_ | 8 #define CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_ |
9 | 9 |
10 #include "core/include/fxge/fx_ge.h" | 10 #include "core/include/fxge/fx_ge.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 friend class CPDF_RenderStatus; | 130 friend class CPDF_RenderStatus; |
131 friend class CPDF_ProgressiveRenderer; | 131 friend class CPDF_ProgressiveRenderer; |
132 }; | 132 }; |
133 | 133 |
134 class CPDF_ProgressiveRenderer { | 134 class CPDF_ProgressiveRenderer { |
135 public: | 135 public: |
136 // Must match FDF_RENDER_* definitions in public/fpdf_progressive.h, but | 136 // Must match FDF_RENDER_* definitions in public/fpdf_progressive.h, but |
137 // cannot #include that header. fpdfsdk/src/fpdf_progressive.cpp has | 137 // cannot #include that header. fpdfsdk/src/fpdf_progressive.cpp has |
138 // static_asserts to make sure the two sets of values match. | 138 // static_asserts to make sure the two sets of values match. |
139 enum Status { | 139 enum Status { |
140 Ready, // FPDF_RENDER_READER, | 140 Ready, // FPDF_RENDER_READER |
141 ToBeContinued, // FPDF_RENDER_TOBECOUNTINUED, | 141 ToBeContinued, // FPDF_RENDER_TOBECOUNTINUED |
142 Done, // FPDF_RENDER_DONE, | 142 Done, // FPDF_RENDER_DONE |
143 Failed, // FPDF_RENDER_FAILED | 143 Failed // FPDF_RENDER_FAILED |
144 }; | 144 }; |
| 145 |
145 static int ToFPDFStatus(Status status) { return static_cast<int>(status); } | 146 static int ToFPDFStatus(Status status) { return static_cast<int>(status); } |
146 | 147 |
147 CPDF_ProgressiveRenderer(CPDF_RenderContext* pContext, | 148 CPDF_ProgressiveRenderer(CPDF_RenderContext* pContext, |
148 CFX_RenderDevice* pDevice, | 149 CFX_RenderDevice* pDevice, |
149 const CPDF_RenderOptions* pOptions); | 150 const CPDF_RenderOptions* pOptions); |
150 ~CPDF_ProgressiveRenderer(); | 151 ~CPDF_ProgressiveRenderer(); |
151 | 152 |
152 Status GetStatus() const { return m_Status; } | 153 Status GetStatus() const { return m_Status; } |
153 void Start(IFX_Pause* pPause); | 154 void Start(IFX_Pause* pPause); |
154 void Continue(IFX_Pause* pPause); | 155 void Continue(IFX_Pause* pPause); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 public: | 286 public: |
286 CPDF_RenderConfig(); | 287 CPDF_RenderConfig(); |
287 ~CPDF_RenderConfig(); | 288 ~CPDF_RenderConfig(); |
288 int m_HalftoneLimit; | 289 int m_HalftoneLimit; |
289 int m_RenderStepLimit; | 290 int m_RenderStepLimit; |
290 }; | 291 }; |
291 | 292 |
292 FX_BOOL IsAvailableMatrix(const CFX_AffineMatrix& matrix); | 293 FX_BOOL IsAvailableMatrix(const CFX_AffineMatrix& matrix); |
293 | 294 |
294 #endif // CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_ | 295 #endif // CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_ |
OLD | NEW |