• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef CORE_FPDFAPI_RENDER_CPDF_IMAGELOADER_H_
8 #define CORE_FPDFAPI_RENDER_CPDF_IMAGELOADER_H_
9 
10 #include <memory>
11 
12 #include "core/fxcrt/fx_basic.h"
13 #include "core/fxge/fx_dib.h"
14 
15 class CPDF_ImageObject;
16 class CPDF_PageRenderCache;
17 class CPDF_RenderStatus;
18 
19 class CPDF_ImageLoader {
20  public:
21   CPDF_ImageLoader();
22   ~CPDF_ImageLoader();
23 
24   bool Start(const CPDF_ImageObject* pImage,
25              CPDF_PageRenderCache* pCache,
26              bool bStdCS,
27              uint32_t GroupFamily,
28              bool bLoadMask,
29              CPDF_RenderStatus* pRenderStatus,
30              int32_t nDownsampleWidth,
31              int32_t nDownsampleHeight);
32   bool Continue(IFX_Pause* pPause);
33 
34   CFX_DIBSource* m_pBitmap;
35   CFX_DIBSource* m_pMask;
36   uint32_t m_MatteColor;
37   bool m_bCached;
38 
39  private:
40   void HandleFailure();
41 
42   int32_t m_nDownsampleWidth;
43   int32_t m_nDownsampleHeight;
44   CPDF_PageRenderCache* m_pCache;
45   CPDF_ImageObject* m_pImage;
46 };
47 
48 #endif  // CORE_FPDFAPI_RENDER_CPDF_IMAGELOADER_H_
49