| 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_PAGERENDERCACHE_H_ | 7 #ifndef CORE_FPDFAPI_RENDER_CPDF_PAGERENDERCACHE_H_ |
| 8 #define CORE_FPDFAPI_RENDER_CPDF_PAGERENDERCACHE_H_ | 8 #define CORE_FPDFAPI_RENDER_CPDF_PAGERENDERCACHE_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 uint32_t EstimateSize(); | 27 uint32_t EstimateSize(); |
| 28 void CacheOptimization(int32_t dwLimitCacheSize); | 28 void CacheOptimization(int32_t dwLimitCacheSize); |
| 29 uint32_t GetTimeCount() const { return m_nTimeCount; } | 29 uint32_t GetTimeCount() const { return m_nTimeCount; } |
| 30 void SetTimeCount(uint32_t dwTimeCount) { m_nTimeCount = dwTimeCount; } | 30 void SetTimeCount(uint32_t dwTimeCount) { m_nTimeCount = dwTimeCount; } |
| 31 | 31 |
| 32 void GetCachedBitmap(CPDF_Stream* pStream, | 32 void GetCachedBitmap(CPDF_Stream* pStream, |
| 33 CFX_DIBSource*& pBitmap, | 33 CFX_DIBSource*& pBitmap, |
| 34 CFX_DIBSource*& pMask, | 34 CFX_DIBSource*& pMask, |
| 35 uint32_t& MatteColor, | 35 uint32_t& MatteColor, |
| 36 FX_BOOL bStdCS = FALSE, | 36 bool bStdCS = false, |
| 37 uint32_t GroupFamily = 0, | 37 uint32_t GroupFamily = 0, |
| 38 FX_BOOL bLoadMask = FALSE, | 38 bool bLoadMask = false, |
| 39 CPDF_RenderStatus* pRenderStatus = nullptr, | 39 CPDF_RenderStatus* pRenderStatus = nullptr, |
| 40 int32_t downsampleWidth = 0, | 40 int32_t downsampleWidth = 0, |
| 41 int32_t downsampleHeight = 0); | 41 int32_t downsampleHeight = 0); |
| 42 | 42 |
| 43 void ResetBitmap(CPDF_Stream* pStream, const CFX_DIBitmap* pBitmap); | 43 void ResetBitmap(CPDF_Stream* pStream, const CFX_DIBitmap* pBitmap); |
| 44 void ClearImageCacheEntry(CPDF_Stream* pStream); | 44 void ClearImageCacheEntry(CPDF_Stream* pStream); |
| 45 CPDF_Page* GetPage() const { return m_pPage; } | 45 CPDF_Page* GetPage() const { return m_pPage; } |
| 46 CPDF_ImageCacheEntry* GetCurImageCacheEntry() const { | 46 CPDF_ImageCacheEntry* GetCurImageCacheEntry() const { |
| 47 return m_pCurImageCacheEntry; | 47 return m_pCurImageCacheEntry; |
| 48 } | 48 } |
| 49 | 49 |
| 50 FX_BOOL StartGetCachedBitmap(CPDF_Stream* pStream, | 50 bool StartGetCachedBitmap(CPDF_Stream* pStream, |
| 51 FX_BOOL bStdCS = FALSE, | 51 bool bStdCS = false, |
| 52 uint32_t GroupFamily = 0, | 52 uint32_t GroupFamily = 0, |
| 53 FX_BOOL bLoadMask = FALSE, | 53 bool bLoadMask = false, |
| 54 CPDF_RenderStatus* pRenderStatus = nullptr, | 54 CPDF_RenderStatus* pRenderStatus = nullptr, |
| 55 int32_t downsampleWidth = 0, | 55 int32_t downsampleWidth = 0, |
| 56 int32_t downsampleHeight = 0); | 56 int32_t downsampleHeight = 0); |
| 57 | 57 |
| 58 FX_BOOL Continue(IFX_Pause* pPause); | 58 bool Continue(IFX_Pause* pPause); |
| 59 | 59 |
| 60 protected: | 60 protected: |
| 61 friend class CPDF_Page; | 61 friend class CPDF_Page; |
| 62 | 62 |
| 63 CPDF_Page* const m_pPage; | 63 CPDF_Page* const m_pPage; |
| 64 CPDF_ImageCacheEntry* m_pCurImageCacheEntry; | 64 CPDF_ImageCacheEntry* m_pCurImageCacheEntry; |
| 65 std::map<CPDF_Stream*, CPDF_ImageCacheEntry*> m_ImageCache; | 65 std::map<CPDF_Stream*, CPDF_ImageCacheEntry*> m_ImageCache; |
| 66 uint32_t m_nTimeCount; | 66 uint32_t m_nTimeCount; |
| 67 uint32_t m_nCacheSize; | 67 uint32_t m_nCacheSize; |
| 68 FX_BOOL m_bCurFindCache; | 68 bool m_bCurFindCache; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 #endif // CORE_FPDFAPI_RENDER_CPDF_PAGERENDERCACHE_H_ | 71 #endif // CORE_FPDFAPI_RENDER_CPDF_PAGERENDERCACHE_H_ |
| OLD | NEW |