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

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

Issue 2507023006: Move CPDF_DocRenderData from render_int (Closed)
Patch Set: Comments Created 4 years, 1 month 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_text.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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 explicit CPDF_TransferFunc(CPDF_Document* pDoc); 56 explicit CPDF_TransferFunc(CPDF_Document* pDoc);
57 57
58 FX_COLORREF TranslateColor(FX_COLORREF src) const; 58 FX_COLORREF TranslateColor(FX_COLORREF src) const;
59 CFX_DIBSource* TranslateImage(const CFX_DIBSource* pSrc, bool bAutoDropSrc); 59 CFX_DIBSource* TranslateImage(const CFX_DIBSource* pSrc, bool bAutoDropSrc);
60 60
61 CPDF_Document* const m_pPDFDoc; 61 CPDF_Document* const m_pPDFDoc;
62 bool m_bIdentity; 62 bool m_bIdentity;
63 uint8_t m_Samples[256 * 3]; 63 uint8_t m_Samples[256 * 3];
64 }; 64 };
65 65
66 class CPDF_DocRenderData {
67 public:
68 explicit CPDF_DocRenderData(CPDF_Document* pPDFDoc);
69 ~CPDF_DocRenderData();
70 CPDF_Type3Cache* GetCachedType3(CPDF_Type3Font* pFont);
71 CPDF_TransferFunc* GetTransferFunc(CPDF_Object* pObj);
72 void Clear(bool bRelease = false);
73 void ReleaseCachedType3(CPDF_Type3Font* pFont);
74 void ReleaseTransferFunc(CPDF_Object* pObj);
75
76 private:
77 using CPDF_Type3CacheMap =
78 std::map<CPDF_Font*, CPDF_CountedObject<CPDF_Type3Cache>*>;
79 using CPDF_TransferFuncMap =
80 std::map<CPDF_Object*, CPDF_CountedObject<CPDF_TransferFunc>*>;
81
82 CPDF_Document* m_pPDFDoc;
83 CPDF_Type3CacheMap m_Type3FaceMap;
84 CPDF_TransferFuncMap m_TransferFuncMap;
85 };
86
87 class CPDF_RenderStatus { 66 class CPDF_RenderStatus {
88 public: 67 public:
89 CPDF_RenderStatus(); 68 CPDF_RenderStatus();
90 ~CPDF_RenderStatus(); 69 ~CPDF_RenderStatus();
91 70
92 bool Initialize(class CPDF_RenderContext* pContext, 71 bool Initialize(class CPDF_RenderContext* pContext,
93 CFX_RenderDevice* pDevice, 72 CFX_RenderDevice* pDevice,
94 const CFX_Matrix* pDeviceMatrix, 73 const CFX_Matrix* pDeviceMatrix,
95 const CPDF_PageObject* pStopObj, 74 const CPDF_PageObject* pStopObj,
96 const CPDF_RenderStatus* pParentStatus, 75 const CPDF_RenderStatus* pParentStatus,
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 const uint8_t* src_buf, 562 const uint8_t* src_buf,
584 int pixels, 563 int pixels,
585 int Bpp) const override; 564 int Bpp) const override;
586 565
587 const uint8_t* m_RampR; 566 const uint8_t* m_RampR;
588 const uint8_t* m_RampG; 567 const uint8_t* m_RampG;
589 const uint8_t* m_RampB; 568 const uint8_t* m_RampB;
590 }; 569 };
591 570
592 #endif // CORE_FPDFAPI_RENDER_RENDER_INT_H_ 571 #endif // CORE_FPDFAPI_RENDER_RENDER_INT_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/render/fpdf_render_text.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698