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

Unified Diff: src/fonts/SkFontMgr_indirect.cpp

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 | « include/ports/SkFontMgr_indirect.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fonts/SkFontMgr_indirect.cpp
===================================================================
--- src/fonts/SkFontMgr_indirect.cpp (revision 13897)
+++ src/fonts/SkFontMgr_indirect.cpp (working copy)
@@ -155,12 +155,12 @@
}
int SkFontMgr_Indirect::onCountFamilies() const {
- SkOnce(&fOnce, SkFontMgr_Indirect::set_up_family_names, this);
+ SkOnce(&fFamilyNamesInited, &fFamilyNamesMutex, SkFontMgr_Indirect::set_up_family_names, this);
return fFamilyNames->count();
}
void SkFontMgr_Indirect::onGetFamilyName(int index, SkString* familyName) const {
- SkOnce(&fOnce, SkFontMgr_Indirect::set_up_family_names, this);
+ SkOnce(&fFamilyNamesInited, &fFamilyNamesMutex, SkFontMgr_Indirect::set_up_family_names, this);
if (index >= fFamilyNames->count()) {
familyName->reset();
return;
« no previous file with comments | « include/ports/SkFontMgr_indirect.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698