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

Side by Side Diff: core/fpdfapi/fpdf_render/render_int.h

Issue 2350763002: Revert of Pdfium: Fix fonts leaking on ClosePage. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 4 years, 3 months 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/fpdf_render/fpdf_render_text.cpp ('k') | core/fxge/agg/fx_agg_driver.h » ('j') | 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_FPDF_RENDER_RENDER_INT_H_ 7 #ifndef CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_
8 #define CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ 8 #define CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <vector> 12 #include <vector>
13 13
14 #include "core/fpdfapi/fpdf_page/cpdf_countedobject.h" 14 #include "core/fpdfapi/fpdf_page/cpdf_countedobject.h"
15 #include "core/fpdfapi/fpdf_page/cpdf_graphicstates.h" 15 #include "core/fpdfapi/fpdf_page/cpdf_graphicstates.h"
16 #include "core/fpdfapi/fpdf_page/include/cpdf_clippath.h" 16 #include "core/fpdfapi/fpdf_page/include/cpdf_clippath.h"
17 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h" 17 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h"
18 #include "core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h" 18 #include "core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h"
19 #include "core/fxge/include/cfx_fxgedevice.h" 19 #include "core/fxge/include/cfx_fxgedevice.h"
20 #include "core/fxge/include/cfx_renderdevice.h" 20 #include "core/fxge/include/cfx_renderdevice.h"
21 21
22 class CCodec_Jbig2Context; 22 class CCodec_Jbig2Context;
23 class CCodec_ScanlineDecoder; 23 class CCodec_ScanlineDecoder;
24 class CFX_FontCache;
24 class CFX_GlyphBitmap; 25 class CFX_GlyphBitmap;
25 class CFX_ImageTransformer; 26 class CFX_ImageTransformer;
26 class CFX_PathData; 27 class CFX_PathData;
27 class CPDF_Color; 28 class CPDF_Color;
28 class CPDF_Dictionary; 29 class CPDF_Dictionary;
29 class CPDF_Document; 30 class CPDF_Document;
30 class CPDF_Font; 31 class CPDF_Font;
31 class CPDF_FormObject; 32 class CPDF_FormObject;
32 class CPDF_ImageCacheEntry; 33 class CPDF_ImageCacheEntry;
33 class CPDF_ImageLoaderHandle; 34 class CPDF_ImageLoaderHandle;
(...skipping 29 matching lines...) Expand all
63 FX_BOOL m_bIdentity; 64 FX_BOOL m_bIdentity;
64 uint8_t m_Samples[256 * 3]; 65 uint8_t m_Samples[256 * 3];
65 }; 66 };
66 67
67 class CPDF_DocRenderData { 68 class CPDF_DocRenderData {
68 public: 69 public:
69 explicit CPDF_DocRenderData(CPDF_Document* pPDFDoc); 70 explicit CPDF_DocRenderData(CPDF_Document* pPDFDoc);
70 ~CPDF_DocRenderData(); 71 ~CPDF_DocRenderData();
71 CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont); 72 CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont);
72 CPDF_TransferFunc* GetTransferFunc(CPDF_Object* pObj); 73 CPDF_TransferFunc* GetTransferFunc(CPDF_Object* pObj);
74 CFX_FontCache* GetFontCache() { return m_pFontCache; }
73 void Clear(FX_BOOL bRelease = FALSE); 75 void Clear(FX_BOOL bRelease = FALSE);
74 void ReleaseCachedType3(CPDF_Type3Font* pFont); 76 void ReleaseCachedType3(CPDF_Type3Font* pFont);
75 void ReleaseTransferFunc(CPDF_Object* pObj); 77 void ReleaseTransferFunc(CPDF_Object* pObj);
76 78
77 private: 79 private:
78 using CPDF_Type3CacheMap = 80 using CPDF_Type3CacheMap =
79 std::map<CPDF_Font*, CPDF_CountedObject<CPDF_Type3Cache>*>; 81 std::map<CPDF_Font*, CPDF_CountedObject<CPDF_Type3Cache>*>;
80 using CPDF_TransferFuncMap = 82 using CPDF_TransferFuncMap =
81 std::map<CPDF_Object*, CPDF_CountedObject<CPDF_TransferFunc>*>; 83 std::map<CPDF_Object*, CPDF_CountedObject<CPDF_TransferFunc>*>;
82 84
83 CPDF_Document* m_pPDFDoc; 85 CPDF_Document* m_pPDFDoc;
86 CFX_FontCache* m_pFontCache;
84 CPDF_Type3CacheMap m_Type3FaceMap; 87 CPDF_Type3CacheMap m_Type3FaceMap;
85 CPDF_TransferFuncMap m_TransferFuncMap; 88 CPDF_TransferFuncMap m_TransferFuncMap;
86 }; 89 };
87 90
88 class CPDF_RenderStatus { 91 class CPDF_RenderStatus {
89 public: 92 public:
90 CPDF_RenderStatus(); 93 CPDF_RenderStatus();
91 ~CPDF_RenderStatus(); 94 ~CPDF_RenderStatus();
92 95
93 FX_BOOL Initialize(class CPDF_RenderContext* pContext, 96 FX_BOOL Initialize(class CPDF_RenderContext* pContext,
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 const uint8_t* src_buf, 590 const uint8_t* src_buf,
588 int pixels, 591 int pixels,
589 int Bpp) const override; 592 int Bpp) const override;
590 593
591 const uint8_t* m_RampR; 594 const uint8_t* m_RampR;
592 const uint8_t* m_RampG; 595 const uint8_t* m_RampG;
593 const uint8_t* m_RampB; 596 const uint8_t* m_RampB;
594 }; 597 };
595 598
596 #endif // CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_ 599 #endif // CORE_FPDFAPI_FPDF_RENDER_RENDER_INT_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render_text.cpp ('k') | core/fxge/agg/fx_agg_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698