Flutter Engine
The Flutter Engine
SkFontConfigInterface.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2016 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
8
12
13static SkMutex& font_config_interface_mutex() {
14 static SkMutex& mutex = *(new SkMutex);
15 return mutex;
16}
18
21
24 }
26}
27
30
33}
34
36 sk_sp<SkFontMgr> mgr) {
37 return mgr->makeFromStream(std::unique_ptr<SkStreamAsset>(this->openStream(identity)),
38 identity.fTTCIndex);
39}
static SkMutex & font_config_interface_mutex()
static SkFontConfigInterface * gFontConfigInterface
static void SkSafeUnref(T *obj)
Definition: SkRefCnt.h:149
sk_sp< T > sk_ref_sp(T *obj)
Definition: SkRefCnt.h:381
virtual sk_sp< SkTypeface > makeTypeface(const FontIdentity &identity, sk_sp< SkFontMgr > mgr)
static SkFontConfigInterface * GetSingletonDirectInterface()
static void SetGlobal(sk_sp< SkFontConfigInterface > fc)
virtual SkStreamAsset * openStream(const FontIdentity &)=0
static sk_sp< SkFontConfigInterface > RefGlobal()
sk_sp< SkTypeface > makeFromStream(std::unique_ptr< SkStreamAsset >, int ttcIndex=0) const
Definition: SkFontMgr.cpp:127
T * release()
Definition: SkRefCnt.h:324