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

Side by Side Diff: core/fxge/android/fpf_skiamodule.cpp

Issue 2448293002: Name core/fxge/android files appropriately and use one file per class (Closed)
Patch Set: Fix build 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
OLDNEW
(Empty)
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #include "core/fxcrt/fx_system.h"
8
9 #if _FX_OS_ == _FX_ANDROID_
10
11 #include "core/fxge/android/fpf_skiafontmgr.h"
12 #include "core/fxge/android/fpf_skiamodule.h"
13
14 namespace {
15
16 CFPF_SkiaDeviceModule* gs_pPFModule = nullptr;
17
18 } // namespace
19
20 CFPF_SkiaDeviceModule* CFPF_GetSkiaDeviceModule() {
21 if (!gs_pPFModule)
22 gs_pPFModule = new CFPF_SkiaDeviceModule;
23 return gs_pPFModule;
24 }
25
26 CFPF_SkiaDeviceModule::~CFPF_SkiaDeviceModule() {
27 delete m_pFontMgr;
28 }
29
30 void CFPF_SkiaDeviceModule::Destroy() {
31 delete gs_pPFModule;
32 gs_pPFModule = nullptr;
33 }
34
35 CFPF_SkiaFontMgr* CFPF_SkiaDeviceModule::GetFontMgr() {
36 if (!m_pFontMgr) {
37 m_pFontMgr = new CFPF_SkiaFontMgr;
38 if (!m_pFontMgr->InitFTLibrary()) {
39 delete m_pFontMgr;
40 return nullptr;
41 }
42 }
43 return m_pFontMgr;
44 }
45
46 #endif // _FX_OS_ == _FX_ANDROID_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698