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