| OLD | NEW |
| 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_FPDFAPI_RENDER_CPDF_IMAGELOADER_H_ | 7 #ifndef CORE_FPDFAPI_RENDER_CPDF_IMAGELOADER_H_ |
| 8 #define CORE_FPDFAPI_RENDER_CPDF_IMAGELOADER_H_ | 8 #define CORE_FPDFAPI_RENDER_CPDF_IMAGELOADER_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "core/fxcrt/fx_basic.h" | 12 #include "core/fxcrt/fx_basic.h" |
| 13 #include "core/fxge/fx_dib.h" | 13 #include "core/fxge/fx_dib.h" |
| 14 | 14 |
| 15 class CPDF_ImageLoaderHandle; | |
| 16 class CPDF_ImageObject; | 15 class CPDF_ImageObject; |
| 17 class CPDF_PageRenderCache; | 16 class CPDF_PageRenderCache; |
| 18 class CPDF_RenderStatus; | 17 class CPDF_RenderStatus; |
| 19 | 18 |
| 20 class CPDF_ImageLoader { | 19 class CPDF_ImageLoader { |
| 21 public: | 20 public: |
| 22 CPDF_ImageLoader(); | 21 CPDF_ImageLoader(); |
| 23 ~CPDF_ImageLoader(); | 22 ~CPDF_ImageLoader(); |
| 24 | 23 |
| 25 bool Start(const CPDF_ImageObject* pImage, | 24 bool Start(const CPDF_ImageObject* pImage, |
| 26 CPDF_PageRenderCache* pCache, | 25 CPDF_PageRenderCache* pCache, |
| 27 bool bStdCS, | 26 bool bStdCS, |
| 28 uint32_t GroupFamily, | 27 uint32_t GroupFamily, |
| 29 bool bLoadMask, | 28 bool bLoadMask, |
| 30 CPDF_RenderStatus* pRenderStatus, | 29 CPDF_RenderStatus* pRenderStatus, |
| 31 int32_t nDownsampleWidth, | 30 int32_t nDownsampleWidth, |
| 32 int32_t nDownsampleHeight); | 31 int32_t nDownsampleHeight); |
| 33 bool Continue(IFX_Pause* pPause); | 32 bool Continue(IFX_Pause* pPause); |
| 34 | 33 |
| 35 CFX_DIBSource* m_pBitmap; | 34 CFX_DIBSource* m_pBitmap; |
| 36 CFX_DIBSource* m_pMask; | 35 CFX_DIBSource* m_pMask; |
| 37 uint32_t m_MatteColor; | 36 uint32_t m_MatteColor; |
| 38 bool m_bCached; | 37 bool m_bCached; |
| 39 | 38 |
| 40 private: | 39 private: |
| 40 void HandleFailure(); |
| 41 |
| 41 int32_t m_nDownsampleWidth; | 42 int32_t m_nDownsampleWidth; |
| 42 int32_t m_nDownsampleHeight; | 43 int32_t m_nDownsampleHeight; |
| 43 | 44 CPDF_PageRenderCache* m_pCache; |
| 44 std::unique_ptr<CPDF_ImageLoaderHandle> m_pLoadHandle; | 45 CPDF_ImageObject* m_pImage; |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 #endif // CORE_FPDFAPI_RENDER_CPDF_IMAGELOADER_H_ | 48 #endif // CORE_FPDFAPI_RENDER_CPDF_IMAGELOADER_H_ |
| OLD | NEW |