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

Unified Diff: src/fonts/SkFontMgr_indirect.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/fonts/SkFontMgr_indirect.cpp
diff --git a/src/fonts/SkFontMgr_indirect.cpp b/src/fonts/SkFontMgr_indirect.cpp
index d3fae91808af8d9f6d1019c2ab3a6ba4017ac4de..01a24c5174a2e46479c78a9e9dfe591e1901f75f 100644
--- a/src/fonts/SkFontMgr_indirect.cpp
+++ b/src/fonts/SkFontMgr_indirect.cpp
@@ -65,12 +65,12 @@ void SkFontMgr_Indirect::set_up_family_names(const SkFontMgr_Indirect* self) {
}
int SkFontMgr_Indirect::onCountFamilies() const {
- SkOnce(&fFamilyNamesInited, &fFamilyNamesMutex, SkFontMgr_Indirect::set_up_family_names, this);
+ fFamilyNamesInitOnce(SkFontMgr_Indirect::set_up_family_names, this);
return fFamilyNames->count();
}
void SkFontMgr_Indirect::onGetFamilyName(int index, SkString* familyName) const {
- SkOnce(&fFamilyNamesInited, &fFamilyNamesMutex, SkFontMgr_Indirect::set_up_family_names, this);
+ fFamilyNamesInitOnce(SkFontMgr_Indirect::set_up_family_names, this);
if (index >= fFamilyNames->count()) {
familyName->reset();
return;

Powered by Google App Engine
This is Rietveld 408576698