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

Side by Side Diff: core/fpdfapi/render/render_int.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 | « core/fpdfapi/render/fpdf_render_cache.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 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_RENDER_INT_H_ 7 #ifndef CORE_FPDFAPI_RENDER_RENDER_INT_H_
8 #define CORE_FPDFAPI_RENDER_RENDER_INT_H_ 8 #define CORE_FPDFAPI_RENDER_RENDER_INT_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class CPDF_ShadingObject; 42 class CPDF_ShadingObject;
43 class CPDF_ShadingPattern; 43 class CPDF_ShadingPattern;
44 class CPDF_Stream; 44 class CPDF_Stream;
45 class CPDF_TilingPattern; 45 class CPDF_TilingPattern;
46 class CPDF_TransferFunc; 46 class CPDF_TransferFunc;
47 class CPDF_Type3Cache; 47 class CPDF_Type3Cache;
48 class CPDF_Type3Glyphs; 48 class CPDF_Type3Glyphs;
49 class CPDF_Type3Char; 49 class CPDF_Type3Char;
50 class CPDF_Type3Font; 50 class CPDF_Type3Font;
51 51
52 class CPDF_ImageCacheEntry {
53 public:
54 CPDF_ImageCacheEntry(CPDF_Document* pDoc, CPDF_Stream* pStream);
55 ~CPDF_ImageCacheEntry();
56
57 void Reset(const CFX_DIBitmap* pBitmap);
58 bool GetCachedBitmap(CFX_DIBSource*& pBitmap,
59 CFX_DIBSource*& pMask,
60 uint32_t& MatteColor,
61 CPDF_Dictionary* pPageResources,
62 bool bStdCS = false,
63 uint32_t GroupFamily = 0,
64 bool bLoadMask = false,
65 CPDF_RenderStatus* pRenderStatus = nullptr,
66 int32_t downsampleWidth = 0,
67 int32_t downsampleHeight = 0);
68 uint32_t EstimateSize() const { return m_dwCacheSize; }
69 uint32_t GetTimeCount() const { return m_dwTimeCount; }
70 CPDF_Stream* GetStream() const { return m_pStream; }
71 void SetTimeCount(uint32_t dwTimeCount) { m_dwTimeCount = dwTimeCount; }
72 int m_dwTimeCount;
73
74 public:
75 int StartGetCachedBitmap(CPDF_Dictionary* pFormResources,
76 CPDF_Dictionary* pPageResources,
77 bool bStdCS = false,
78 uint32_t GroupFamily = 0,
79 bool bLoadMask = false,
80 CPDF_RenderStatus* pRenderStatus = nullptr,
81 int32_t downsampleWidth = 0,
82 int32_t downsampleHeight = 0);
83 int Continue(IFX_Pause* pPause);
84 CFX_DIBSource* DetachBitmap();
85 CFX_DIBSource* DetachMask();
86 CFX_DIBSource* m_pCurBitmap;
87 CFX_DIBSource* m_pCurMask;
88 uint32_t m_MatteColor;
89 CPDF_RenderStatus* m_pRenderStatus;
90
91 protected:
92 void ContinueGetCachedBitmap();
93
94 CPDF_Document* m_pDocument;
95 CPDF_Stream* m_pStream;
96 std::unique_ptr<CFX_DIBSource> m_pCachedBitmap;
97 std::unique_ptr<CFX_DIBSource> m_pCachedMask;
98 uint32_t m_dwCacheSize;
99 void CalcSize();
100 };
101
102 typedef struct { 52 typedef struct {
103 FX_FLOAT m_DecodeMin; 53 FX_FLOAT m_DecodeMin;
104 FX_FLOAT m_DecodeStep; 54 FX_FLOAT m_DecodeStep;
105 int m_ColorKeyMin; 55 int m_ColorKeyMin;
106 int m_ColorKeyMax; 56 int m_ColorKeyMax;
107 } DIB_COMP_DATA; 57 } DIB_COMP_DATA;
108 58
109 class CPDF_DIBSource : public CFX_DIBSource { 59 class CPDF_DIBSource : public CFX_DIBSource {
110 public: 60 public:
111 CPDF_DIBSource(); 61 CPDF_DIBSource();
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 const uint8_t* src_buf, 188 const uint8_t* src_buf,
239 int pixels, 189 int pixels,
240 int Bpp) const override; 190 int Bpp) const override;
241 191
242 const uint8_t* m_RampR; 192 const uint8_t* m_RampR;
243 const uint8_t* m_RampG; 193 const uint8_t* m_RampG;
244 const uint8_t* m_RampB; 194 const uint8_t* m_RampB;
245 }; 195 };
246 196
247 #endif // CORE_FPDFAPI_RENDER_RENDER_INT_H_ 197 #endif // CORE_FPDFAPI_RENDER_RENDER_INT_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/render/fpdf_render_cache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698