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
cfpf_skiadevicemodule.cpp
Go to the documentation of this file.
1// Copyright 2016 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 "core/fxge/android/cfpf_skiadevicemodule.h"
8
9#include <utility>
10
11#include "core/fxge/android/cfpf_skiafontmgr.h"
12
13namespace {
14
15CFPF_SkiaDeviceModule* gs_pPFModule = nullptr;
16
17} // namespace
18
20 if (!gs_pPFModule)
21 gs_pPFModule = new CFPF_SkiaDeviceModule;
22 return gs_pPFModule;
23}
24
26
28
30 delete gs_pPFModule;
31 gs_pPFModule = nullptr;
32}
33
35 if (!m_pFontMgr) {
36 auto pNewMgr = std::make_unique<CFPF_SkiaFontMgr>();
37 if (!pNewMgr->InitFTLibrary())
38 return nullptr;
39 m_pFontMgr = std::move(pNewMgr);
40 }
41 return m_pFontMgr.get();
42}
CFPF_SkiaDeviceModule * CFPF_GetSkiaDeviceModule()
CFPF_SkiaFontMgr * GetFontMgr()