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

Unified Diff: src/utils/win/SkDWrite.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/utils/win/SkDWrite.cpp
diff --git a/src/utils/win/SkDWrite.cpp b/src/utils/win/SkDWrite.cpp
index 2fdd6115b00d9cd5b5aca80fab1f9cf149a9661e..17613f6fad87bbaae5388bd42610f3accf2c3795 100644
--- a/src/utils/win/SkDWrite.cpp
+++ b/src/utils/win/SkDWrite.cpp
@@ -43,9 +43,9 @@ static void create_dwrite_factory(IDWriteFactory** factory) {
}
-SK_DECLARE_STATIC_ONCE(once);
IDWriteFactory* sk_get_dwrite_factory() {
- SkOnce(&once, create_dwrite_factory, &gDWriteFactory);
+ static SkOnce once;
+ once(create_dwrite_factory, &gDWriteFactory);
return gDWriteFactory;
}
« src/core/SkTaskGroup.cpp ('K') | « src/gpu/GrProgramElement.cpp ('k') | tests/OnceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698