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 #include "core/src/fxge/android/fx_fpf.h" | 7 #include "core/include/fxcrt/fx_system.h" |
| 8 |
8 #if _FX_OS_ == _FX_ANDROID_ | 9 #if _FX_OS_ == _FX_ANDROID_ |
| 10 |
| 11 #include "core/include/fxge/fpf.h" |
| 12 #include "core/include/fxge/fx_ge.h" |
| 13 #include "core/src/fxge/android/fx_android_font.h" |
| 14 |
9 void CFX_GEModule::InitPlatform() { | 15 void CFX_GEModule::InitPlatform() { |
10 IFPF_DeviceModule* pDeviceModule = FPF_GetDeviceModule(); | 16 IFPF_DeviceModule* pDeviceModule = FPF_GetDeviceModule(); |
11 if (!pDeviceModule) { | 17 if (!pDeviceModule) { |
12 return; | 18 return; |
13 } | 19 } |
14 IFPF_FontMgr* pFontMgr = pDeviceModule->GetFontMgr(); | 20 IFPF_FontMgr* pFontMgr = pDeviceModule->GetFontMgr(); |
15 if (pFontMgr) { | 21 if (pFontMgr) { |
16 CFX_AndroidFontInfo* pFontInfo = new CFX_AndroidFontInfo; | 22 CFX_AndroidFontInfo* pFontInfo = new CFX_AndroidFontInfo; |
17 pFontInfo->Init(pFontMgr); | 23 pFontInfo->Init(pFontMgr); |
18 m_pFontMgr->SetSystemFontInfo(pFontInfo); | 24 m_pFontMgr->SetSystemFontInfo(pFontInfo); |
19 } | 25 } |
20 m_pPlatformData = pDeviceModule; | 26 m_pPlatformData = pDeviceModule; |
21 } | 27 } |
22 void CFX_GEModule::DestroyPlatform() { | 28 void CFX_GEModule::DestroyPlatform() { |
23 if (m_pPlatformData) { | 29 if (m_pPlatformData) { |
24 ((IFPF_DeviceModule*)m_pPlatformData)->Destroy(); | 30 ((IFPF_DeviceModule*)m_pPlatformData)->Destroy(); |
25 } | 31 } |
26 } | 32 } |
| 33 |
27 #endif | 34 #endif |
OLD | NEW |