Home | History | Annotate | Download | only in render
      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/retain_ptr.h"
     13 #include "core/fxcrt/unowned_ptr.h"
     14 #include "core/fxge/fx_dib.h"
     15 
     16 class CPDF_ImageObject;
     17 class CPDF_PageRenderCache;
     18 class CPDF_RenderStatus;
     19 class IFX_PauseIndicator;
     20 
     21 class CPDF_ImageLoader {
     22  public:
     23   CPDF_ImageLoader();
     24   ~CPDF_ImageLoader();
     25 
     26   bool Start(const CPDF_ImageObject* pImage,
     27              CPDF_PageRenderCache* pCache,
     28              bool bStdCS,
     29              uint32_t GroupFamily,
     30              bool bLoadMask,
     31              CPDF_RenderStatus* pRenderStatus);
     32   bool Continue(IFX_PauseIndicator* pPause, CPDF_RenderStatus* pRenderStatus);
     33 
     34   RetainPtr<CFX_DIBSource> m_pBitmap;
     35   RetainPtr<CFX_DIBSource> m_pMask;
     36   uint32_t m_MatteColor;
     37   bool m_bCached;
     38 
     39  private:
     40   void HandleFailure();
     41 
     42   UnownedPtr<CPDF_PageRenderCache> m_pCache;
     43   UnownedPtr<CPDF_ImageObject> m_pImageObject;
     44 };
     45 
     46 #endif  // CORE_FPDFAPI_RENDER_CPDF_IMAGELOADER_H_
     47