Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: src/core/SkGlobalInitialization_core.cpp

Issue 1894893002: Modernize and trim down SkOnce. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: might as well class Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/SkGlobalInitialization_core.cpp
diff --git a/src/core/SkGlobalInitialization_core.cpp b/src/core/SkGlobalInitialization_core.cpp
index ac37073eb3114fd1605e25e9171edb9148c47a75..d7b4a800038cf6b60ef74aeb2c2f74bd2c92a9ce 100644
--- a/src/core/SkGlobalInitialization_core.cpp
+++ b/src/core/SkGlobalInitialization_core.cpp
@@ -53,7 +53,7 @@ void SkFlattenable::PrivateInitializer::InitCore() {
InitEffects();
};
-SK_DECLARE_STATIC_ONCE(once);
void SkFlattenable::InitializeFlattenablesIfNeeded() {
- SkOnce(&once, SkFlattenable::PrivateInitializer::InitCore);
+ static SkOnce once;
+ once(SkFlattenable::PrivateInitializer::InitCore);
}

Powered by Google App Engine
This is Rietveld 408576698