xref: /aosp_15_r20/external/skia/src/ports/SkFontConfigInterface_direct_factory.cpp (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1 /*
2  * Copyright 2009-2015 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  */
7 
8 #include "include/private/base/SkOnce.h"
9 #include "src/ports/SkFontConfigInterface_direct.h"
10 
GetSingletonDirectInterface()11 SkFontConfigInterface* SkFontConfigInterface::GetSingletonDirectInterface() {
12     static SkFontConfigInterface* singleton;
13     static SkOnce once;
14     once([]{ singleton = new SkFontConfigInterfaceDirect(nullptr); });
15     return singleton;
16 }
17