Index: src/ports/SkFontConfigInterface_direct.cpp |
diff --git a/src/ports/SkFontConfigInterface_direct.cpp b/src/ports/SkFontConfigInterface_direct.cpp |
index c0cfd8fdcf9cd9c43ab565cb15e76d58badb9b6b..dc9afbae1f47b642704ca02df68923145f38898f 100644 |
--- a/src/ports/SkFontConfigInterface_direct.cpp |
+++ b/src/ports/SkFontConfigInterface_direct.cpp |
@@ -124,13 +124,9 @@ |
SkMutex mutex_; |
}; |
-SkFontConfigInterface* SkFontConfigInterface::GetSingletonDirectInterface(SkBaseMutex* mutex) { |
- SkAutoMutexAcquire ac(mutex); |
- static SkFontConfigInterfaceDirect* singleton = NULL; |
- if (singleton == NULL) { |
- singleton = SkNEW(SkFontConfigInterfaceDirect); |
- } |
- return singleton; |
+SkFontConfigInterface* SkFontConfigInterface::GetSingletonDirectInterface() { |
+ SK_DECLARE_STATIC_LAZY_PTR(SkFontConfigInterfaceDirect, direct); |
+ return direct.get(); |
} |
/////////////////////////////////////////////////////////////////////////////// |