Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: core/fpdfapi/render/cpdf_imagecacheentry.h

Issue 2550543002: Kill off fpdf_render_cache.cpp (Closed)
Patch Set: Rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « BUILD.gn ('k') | core/fpdfapi/render/cpdf_imagecacheentry.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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_IMAGECACHEENTRY_H_
8 #define CORE_FPDFAPI_RENDER_CPDF_IMAGECACHEENTRY_H_
9
10 #include <memory>
11
12 #include "core/fxcrt/fx_system.h"
13
14 class CFX_DIBitmap;
15 class CFX_DIBSource;
16 class CPDF_Dictionary;
17 class CPDF_Document;
18 class CPDF_RenderStatus;
19 class CPDF_Stream;
20 class IFX_Pause;
21
22 class CPDF_ImageCacheEntry {
23 public:
24 CPDF_ImageCacheEntry(CPDF_Document* pDoc, CPDF_Stream* pStream);
25 ~CPDF_ImageCacheEntry();
26
27 void Reset(const CFX_DIBitmap* pBitmap);
28 bool GetCachedBitmap(CFX_DIBSource*& pBitmap,
29 CFX_DIBSource*& pMask,
30 uint32_t& MatteColor,
31 CPDF_Dictionary* pPageResources,
32 bool bStdCS,
33 uint32_t GroupFamily,
34 bool bLoadMask,
35 CPDF_RenderStatus* pRenderStatus,
36 int32_t downsampleWidth,
37 int32_t downsampleHeight);
38 uint32_t EstimateSize() const { return m_dwCacheSize; }
39 uint32_t GetTimeCount() const { return m_dwTimeCount; }
40 CPDF_Stream* GetStream() const { return m_pStream; }
41
42 int StartGetCachedBitmap(CPDF_Dictionary* pFormResources,
43 CPDF_Dictionary* pPageResources,
44 bool bStdCS,
45 uint32_t GroupFamily,
46 bool bLoadMask,
47 CPDF_RenderStatus* pRenderStatus,
48 int32_t downsampleWidth,
49 int32_t downsampleHeight);
50 int Continue(IFX_Pause* pPause);
51 CFX_DIBSource* DetachBitmap();
52 CFX_DIBSource* DetachMask();
53
54 int m_dwTimeCount;
55 uint32_t m_MatteColor;
56
57 private:
58 void ContinueGetCachedBitmap();
59
60 CPDF_RenderStatus* m_pRenderStatus;
61 CPDF_Document* m_pDocument;
62 CPDF_Stream* m_pStream;
63 CFX_DIBSource* m_pCurBitmap;
64 CFX_DIBSource* m_pCurMask;
65 std::unique_ptr<CFX_DIBSource> m_pCachedBitmap;
66 std::unique_ptr<CFX_DIBSource> m_pCachedMask;
67 uint32_t m_dwCacheSize;
68 void CalcSize();
69 };
70
71 #endif // CORE_FPDFAPI_RENDER_CPDF_IMAGECACHEENTRY_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | core/fpdfapi/render/cpdf_imagecacheentry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698