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

Unified Diff: include/ports/SkFontMgr_indirect.h

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: include/ports/SkFontMgr_indirect.h
diff --git a/include/ports/SkFontMgr_indirect.h b/include/ports/SkFontMgr_indirect.h
index 5e8f1ede70266ddbbba2f5ace2fb2648c540f3a0..d3f47cb82b6096ab9e25754e18717c5907dea11b 100644
--- a/include/ports/SkFontMgr_indirect.h
+++ b/include/ports/SkFontMgr_indirect.h
@@ -9,6 +9,7 @@
#define SkFontMgr_indirect_DEFINED
#include "../private/SkMutex.h"
+#include "../private/SkOnce.h"
#include "../private/SkTArray.h"
#include "SkDataTable.h"
#include "SkFontMgr.h"
@@ -28,7 +29,7 @@ public:
// In the future these calls should be broken out into their own interface
// with a name like SkFontRenderer.
SkFontMgr_Indirect(SkFontMgr* impl, SkRemotableFontMgr* proxy)
- : fImpl(SkRef(impl)), fProxy(SkRef(proxy)), fFamilyNamesInited(false)
+ : fImpl(SkRef(impl)), fProxy(SkRef(proxy))
{ }
protected:
@@ -95,8 +96,7 @@ private:
mutable SkMutex fDataCacheMutex;
mutable SkAutoTUnref<SkDataTable> fFamilyNames;
- mutable bool fFamilyNamesInited;
- mutable SkMutex fFamilyNamesMutex;
+ mutable SkOnce fFamilyNamesInitOnce;
static void set_up_family_names(const SkFontMgr_Indirect* self);
friend class SkStyleSet_Indirect;
« no previous file with comments | « include/gpu/GrResourceKey.h ('k') | include/private/SkOnce.h » ('j') | include/private/SkOnce.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698