Index: src/core/SkImageFilterCache.cpp |
diff --git a/src/core/SkImageFilterCache.cpp b/src/core/SkImageFilterCache.cpp |
index d87cf6b7c33840c85f4dc9a75842a98fd1a7dbd5..ba8a32c889b71c1a2dddc49537dd443d308fc37b 100644 |
--- a/src/core/SkImageFilterCache.cpp |
+++ b/src/core/SkImageFilterCache.cpp |
@@ -9,7 +9,7 @@ |
#include "SkChecksum.h" |
#include "SkMutex.h" |
-#include "SkOncePtr.h" |
+#include "SkOnce.h" |
#include "SkRefCnt.h" |
#include "SkSpecialImage.h" |
#include "SkTDynamicHash.h" |
@@ -125,7 +125,10 @@ SkImageFilterCache* SkImageFilterCache::Create(size_t maxBytes) { |
return new CacheImpl(maxBytes); |
} |
-SK_DECLARE_STATIC_ONCE_PTR(SkImageFilterCache, cache); |
SkImageFilterCache* SkImageFilterCache::Get() { |
- return cache.get([]{ return SkImageFilterCache::Create(kDefaultCacheSize); }); |
+ static SkOnce once; |
+ static SkImageFilterCache* cache; |
+ |
+ once([]{ cache = SkImageFilterCache::Create(kDefaultCacheSize); }); |
+ return cache; |
} |