Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
fx_android_impl.cpp
Go to the documentation of this file.
1
// Copyright 2014 The PDFium Authors
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
<
memory
>
8
#
include
<
utility
>
9
10
#
include
"core/fxcrt/unowned_ptr.h"
11
#
include
"core/fxge/android/cfpf_skiadevicemodule.h"
12
#
include
"core/fxge/android/cfx_androidfontinfo.h"
13
#
include
"core/fxge/cfx_fontmgr.h"
14
#
include
"core/fxge/cfx_gemodule.h"
15
16
class
CAndroidPlatform
:
public
CFX_GEModule
::
PlatformIface
{
17
public
:
18
CAndroidPlatform
() =
default
;
19
~
CAndroidPlatform
()
override
{
20
if
(m_pDeviceModule)
21
m_pDeviceModule->Destroy();
22
}
23
24
void
Init
()
override
{ m_pDeviceModule = CFPF_GetSkiaDeviceModule(); }
25
26
std
::
unique_ptr
<
SystemFontInfoIface
>
CreateDefaultSystemFontInfo
()
override
{
27
CFPF_SkiaFontMgr
* pFontMgr = m_pDeviceModule->GetFontMgr();
28
if
(!pFontMgr)
29
return
nullptr
;
30
31
auto
pFontInfo =
std
::make_unique<CFX_AndroidFontInfo>();
32
pFontInfo->Init(pFontMgr);
33
return
pFontInfo;
34
}
35
36
private
:
37
UnownedPtr
<
CFPF_SkiaDeviceModule
> m_pDeviceModule;
38
};
39
40
// static
41
std::unique_ptr<CFX_GEModule::PlatformIface>
42
CFX_GEModule
::
PlatformIface
::Create() {
43
return
std
::make_unique<
CAndroidPlatform
>();
44
}
CAndroidPlatform
Definition
fx_android_impl.cpp:16
CAndroidPlatform::CreateDefaultSystemFontInfo
std::unique_ptr< SystemFontInfoIface > CreateDefaultSystemFontInfo() override
Definition
fx_android_impl.cpp:26
CAndroidPlatform::~CAndroidPlatform
~CAndroidPlatform() override
Definition
fx_android_impl.cpp:19
CAndroidPlatform::CAndroidPlatform
CAndroidPlatform()=default
CAndroidPlatform::Init
void Init() override
Definition
fx_android_impl.cpp:24
CFPF_SkiaDeviceModule
Definition
cfpf_skiadevicemodule.h:14
CFPF_SkiaFontMgr
Definition
cfpf_skiafontmgr.h:23
CFX_GEModule::PlatformIface
Definition
cfx_gemodule.h:27
CFX_GEModule
Definition
cfx_gemodule.h:25
fxcrt::UnownedPtr
Definition
unowned_ptr.h:75
std
Definition
qfloat16.h:492
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fxge
android
fx_android_impl.cpp
Generated on Sat Sep 21 2024 00:56:01 for Qt by
1.12.0