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