| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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/fxcrt/fx_system.h" | 7 #include "core/fxge/android/cfpf_skiadevicemodule.h" |
| 8 | 8 |
| 9 #if _FX_OS_ == _FX_ANDROID_ | 9 #include "core/fxge/android/cfpf_skiafontmgr.h" |
| 10 | |
| 11 #include "core/fxge/android/fpf_skiafontmgr.h" | |
| 12 #include "core/fxge/android/fpf_skiamodule.h" | |
| 13 | 10 |
| 14 namespace { | 11 namespace { |
| 15 | 12 |
| 16 CFPF_SkiaDeviceModule* gs_pPFModule = nullptr; | 13 CFPF_SkiaDeviceModule* gs_pPFModule = nullptr; |
| 17 | 14 |
| 18 } // namespace | 15 } // namespace |
| 19 | 16 |
| 20 CFPF_SkiaDeviceModule* CFPF_GetSkiaDeviceModule() { | 17 CFPF_SkiaDeviceModule* CFPF_GetSkiaDeviceModule() { |
| 21 if (!gs_pPFModule) | 18 if (!gs_pPFModule) |
| 22 gs_pPFModule = new CFPF_SkiaDeviceModule; | 19 gs_pPFModule = new CFPF_SkiaDeviceModule; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 35 CFPF_SkiaFontMgr* CFPF_SkiaDeviceModule::GetFontMgr() { | 32 CFPF_SkiaFontMgr* CFPF_SkiaDeviceModule::GetFontMgr() { |
| 36 if (!m_pFontMgr) { | 33 if (!m_pFontMgr) { |
| 37 m_pFontMgr = new CFPF_SkiaFontMgr; | 34 m_pFontMgr = new CFPF_SkiaFontMgr; |
| 38 if (!m_pFontMgr->InitFTLibrary()) { | 35 if (!m_pFontMgr->InitFTLibrary()) { |
| 39 delete m_pFontMgr; | 36 delete m_pFontMgr; |
| 40 return nullptr; | 37 return nullptr; |
| 41 } | 38 } |
| 42 } | 39 } |
| 43 return m_pFontMgr; | 40 return m_pFontMgr; |
| 44 } | 41 } |
| 45 | |
| 46 #endif // _FX_OS_ == _FX_ANDROID_ | |
| OLD | NEW |