Index: src/fonts/SkRemotableFontMgr.cpp |
diff --git a/src/fonts/SkRemotableFontMgr.cpp b/src/fonts/SkRemotableFontMgr.cpp |
index 41e3bc3235b67b1756e333bb8988c36bc58f3f0f..aca8a0b193ff62f1cf9ae763580cc8e78dc142f9 100644 |
--- a/src/fonts/SkRemotableFontMgr.cpp |
+++ b/src/fonts/SkRemotableFontMgr.cpp |
@@ -5,7 +5,7 @@ |
* found in the LICENSE file. |
*/ |
-#include "SkOncePtr.h" |
+#include "SkOnce.h" |
#include "SkRemotableFontMgr.h" |
SkRemotableFontIdentitySet::SkRemotableFontIdentitySet(int count, SkFontIdentity** data) |
@@ -15,7 +15,9 @@ SkRemotableFontIdentitySet::SkRemotableFontIdentitySet(int count, SkFontIdentity |
*data = fData; |
} |
-SK_DECLARE_STATIC_ONCE_PTR(SkRemotableFontIdentitySet, empty); |
SkRemotableFontIdentitySet* SkRemotableFontIdentitySet::NewEmpty() { |
- return SkRef(empty.get([]{ return new SkRemotableFontIdentitySet; })); |
+ static SkOnce once; |
+ static SkRemotableFontIdentitySet* empty; |
+ once([]{ empty = new SkRemotableFontIdentitySet; }); |
+ return SkRef(empty); |
} |