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

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

Issue 1881043004: Cleanup IFPF_* interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months 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
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/fxcrt/include/fx_system.h" 7 #include "core/fxcrt/include/fx_system.h"
8 8
9 #if _FX_OS_ == _FX_ANDROID_ 9 #if _FX_OS_ == _FX_ANDROID_
10 10
11 #include "core/fxge/android/fpf_skiamodule.h"
11 #include "core/fxge/android/fx_android_font.h" 12 #include "core/fxge/android/fx_android_font.h"
12 #include "core/fxge/include/fpf.h"
13 #include "core/fxge/include/fx_ge.h" 13 #include "core/fxge/include/fx_ge.h"
14 14
15 void CFX_GEModule::InitPlatform() { 15 void CFX_GEModule::InitPlatform() {
16 IFPF_DeviceModule* pDeviceModule = FPF_GetDeviceModule(); 16 CFPF_SkiaDeviceModule* pDeviceModule = CFPF_GetSkiaDeviceModule();
17 if (!pDeviceModule) { 17 if (!pDeviceModule)
18 return; 18 return;
19 } 19
20 IFPF_FontMgr* pFontMgr = pDeviceModule->GetFontMgr(); 20 CFPF_SkiaFontMgr* pFontMgr = pDeviceModule->GetFontMgr();
21 if (pFontMgr) { 21 if (pFontMgr) {
22 CFX_AndroidFontInfo* pFontInfo = new CFX_AndroidFontInfo; 22 CFX_AndroidFontInfo* pFontInfo = new CFX_AndroidFontInfo;
23 pFontInfo->Init(pFontMgr); 23 pFontInfo->Init(pFontMgr);
24 m_pFontMgr->SetSystemFontInfo(pFontInfo); 24 m_pFontMgr->SetSystemFontInfo(pFontInfo);
25 } 25 }
26 m_pPlatformData = pDeviceModule; 26 m_pPlatformData = pDeviceModule;
27 } 27 }
28
28 void CFX_GEModule::DestroyPlatform() { 29 void CFX_GEModule::DestroyPlatform() {
29 if (m_pPlatformData) { 30 if (m_pPlatformData)
30 ((IFPF_DeviceModule*)m_pPlatformData)->Destroy(); 31 static_cast<IFPF_DeviceModule*>(m_pPlatformData)->Destroy();
31 }
32 } 32 }
33 33
34 #endif 34 #endif // _FX_OS_ == _FX_ANDROID_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698