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

Unified Diff: include/ports/SkFontMgr_indirect.h

Issue 210283002: Clean up SkOnce usage in SkFontMgr_Indirect. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 9 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
« no previous file with comments | « no previous file | src/fonts/SkFontMgr_indirect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/ports/SkFontMgr_indirect.h
===================================================================
--- include/ports/SkFontMgr_indirect.h (revision 13899)
+++ include/ports/SkFontMgr_indirect.h (working copy)
@@ -27,12 +27,8 @@
// 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))
- {
- fOnce.done = false;
- fOnce.lock.thisIsPrivate = 0;
- SkDEBUGCODE(fOnce.lock.shouldBeZero = 0;)
- }
+ : fImpl(SkRef(impl)), fProxy(SkRef(proxy)), fFamilyNamesInited(false)
+ { }
protected:
virtual int onCountFamilies() const SK_OVERRIDE;
@@ -99,7 +95,8 @@
mutable SkMutex fDataCacheMutex;
mutable SkAutoTUnref<SkDataTable> fFamilyNames;
- mutable SkOnceFlag fOnce;
+ mutable bool fFamilyNamesInited;
+ mutable SkMutex fFamilyNamesMutex;
static void set_up_family_names(const SkFontMgr_Indirect* self);
friend class SkStyleSet_Indirect;
« no previous file with comments | « no previous file | src/fonts/SkFontMgr_indirect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698