Index: src/ports/SkFontConfigInterface_direct_factory.cpp |
diff --git a/src/ports/SkFontConfigInterface_direct_factory.cpp b/src/ports/SkFontConfigInterface_direct_factory.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..58dddab1b0c161cc04fdd5f0631ed288c08d671a |
--- /dev/null |
+++ b/src/ports/SkFontConfigInterface_direct_factory.cpp |
@@ -0,0 +1,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.h" |
+#include "SkMutex.h" |
+ |
+SkFontConfigInterface* SkFontConfigInterface::GetSingletonDirectInterface(SkBaseMutex* mutex) { |
+ SkAutoMutexAcquire ac(mutex); |
+ static SkFontConfigInterfaceDirect* singleton = nullptr; |
+ if (singleton == nullptr) { |
+ singleton = new SkFontConfigInterfaceDirect; |
+ } |
+ return singleton; |
+} |