OLD | NEW |
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_FXGE_INCLUDE_FX_GE_H_ | 7 #ifndef CORE_FXGE_INCLUDE_FX_GE_H_ |
8 #define CORE_FXGE_INCLUDE_FX_GE_H_ | 8 #define CORE_FXGE_INCLUDE_FX_GE_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "core/fxge/include/fx_dib.h" | 12 #include "core/fxge/include/fx_dib.h" |
13 #include "core/fxge/include/fx_font.h" | 13 #include "core/fxge/include/fx_font.h" |
14 | 14 |
15 class CCodec_ModuleMgr; | 15 class CCodec_ModuleMgr; |
16 class CFX_FaceCache; | 16 class CFX_FaceCache; |
17 class CFX_Font; | 17 class CFX_Font; |
18 class CFX_FontCache; | 18 class CFX_FontCache; |
19 class CFX_FontMgr; | 19 class CFX_FontMgr; |
20 class CPDF_ShadingPattern; | 20 class CPDF_ShadingPattern; |
21 class IFX_RenderDeviceDriver; | 21 class IFX_RenderDeviceDriver; |
22 class SkPictureRecorder; | 22 class SkPictureRecorder; |
23 | 23 |
24 class CFX_GEModule { | 24 class CFX_GEModule { |
25 public: | 25 public: |
26 static void Create(const char** pUserFontPaths, | |
27 CCodec_ModuleMgr* pCodecModule); | |
28 static CFX_GEModule* Get(); | 26 static CFX_GEModule* Get(); |
29 static void Destroy(); | 27 static void Destroy(); |
30 | 28 |
| 29 void Init(const char** pUserFontPaths, CCodec_ModuleMgr* pCodecModule); |
31 CFX_FontCache* GetFontCache(); | 30 CFX_FontCache* GetFontCache(); |
32 CFX_FontMgr* GetFontMgr() { return m_pFontMgr.get(); } | 31 CFX_FontMgr* GetFontMgr() { return m_pFontMgr.get(); } |
33 void SetTextGamma(FX_FLOAT gammaValue); | 32 void SetTextGamma(FX_FLOAT gammaValue); |
34 const uint8_t* GetTextGammaTable() const; | 33 const uint8_t* GetTextGammaTable() const; |
35 | 34 |
36 CCodec_ModuleMgr* GetCodecModule() { return m_pCodecModule; } | 35 CCodec_ModuleMgr* GetCodecModule() { return m_pCodecModule; } |
37 void* GetPlatformData() { return m_pPlatformData; } | 36 void* GetPlatformData() { return m_pPlatformData; } |
38 | 37 |
39 FXFT_Library m_FTLibrary; | 38 FXFT_Library m_FTLibrary; |
40 | 39 |
41 private: | 40 private: |
42 CFX_GEModule(const char** pUserFontPaths, CCodec_ModuleMgr* pCodecModule); | 41 CFX_GEModule(); |
43 ~CFX_GEModule(); | 42 ~CFX_GEModule(); |
44 | 43 |
45 void InitPlatform(); | 44 void InitPlatform(); |
46 void DestroyPlatform(); | 45 void DestroyPlatform(); |
47 | 46 |
48 uint8_t m_GammaValue[256]; | 47 uint8_t m_GammaValue[256]; |
49 CFX_FontCache* m_pFontCache; | 48 CFX_FontCache* m_pFontCache; |
50 std::unique_ptr<CFX_FontMgr> m_pFontMgr; | 49 std::unique_ptr<CFX_FontMgr> m_pFontMgr; |
51 CCodec_ModuleMgr* const m_pCodecModule; | 50 CCodec_ModuleMgr* m_pCodecModule; |
52 void* m_pPlatformData; | 51 void* m_pPlatformData; |
53 const char** m_pUserFontPaths; | 52 const char** m_pUserFontPaths; |
54 }; | 53 }; |
55 | 54 |
56 struct FX_PATHPOINT { | 55 struct FX_PATHPOINT { |
57 FX_FLOAT m_PointX; | 56 FX_FLOAT m_PointX; |
58 FX_FLOAT m_PointY; | 57 FX_FLOAT m_PointY; |
59 int m_Flag; | 58 int m_Flag; |
60 }; | 59 }; |
61 | 60 |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 bool AttachRecorder(SkPictureRecorder* recorder); | 421 bool AttachRecorder(SkPictureRecorder* recorder); |
423 SkPictureRecorder* CreateRecorder(int size_x, int size_y); | 422 SkPictureRecorder* CreateRecorder(int size_x, int size_y); |
424 void DebugVerifyBitmapIsPreMultiplied() const override; | 423 void DebugVerifyBitmapIsPreMultiplied() const override; |
425 #endif | 424 #endif |
426 | 425 |
427 protected: | 426 protected: |
428 bool m_bOwnedBitmap; | 427 bool m_bOwnedBitmap; |
429 }; | 428 }; |
430 | 429 |
431 #endif // CORE_FXGE_INCLUDE_FX_GE_H_ | 430 #endif // CORE_FXGE_INCLUDE_FX_GE_H_ |
OLD | NEW |