aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkFontConfigInterface_direct_google3_factory.cpp
blob: f0ac53fd8b5e62e176876690af99f8ca23b72d33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * Copyright 2009-2015 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

/* migrated from chrome/src/skia/ext/SkFontHost_fontconfig_direct.cpp */

#include "SkFontConfigInterface_direct_google3.h"
#include "SkMutex.h"

SkFontConfigInterface* SkFontConfigInterface::GetSingletonDirectInterface(SkBaseMutex* mutex) {
    SkAutoMutexAcquire ac(mutex);
    static SkFontConfigInterfaceDirectGoogle3* singleton = nullptr;
    if (singleton == nullptr) {
        singleton = new SkFontConfigInterfaceDirectGoogle3;
    }
    return singleton;
}