aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/ports/SkFontHost_android.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ports/SkFontHost_android.cpp b/src/ports/SkFontHost_android.cpp
index edbc0169af..230e990096 100644
--- a/src/ports/SkFontHost_android.cpp
+++ b/src/ports/SkFontHost_android.cpp
@@ -745,9 +745,10 @@ void SkFontHost::Serialize(const SkTypeface* face, SkWStream* stream) {
}
SkTypeface* SkFontHost::Deserialize(SkStream* stream) {
- SkAutoMutexAcquire ac(gFamilyHeadAndNameListMutex);
-
- load_system_fonts();
+ {
+ SkAutoMutexAcquire ac(gFamilyHeadAndNameListMutex);
+ load_system_fonts();
+ }
// check if the font is a custom or system font
bool isCustomFont = stream->readBool();