Fix deadlock in Android's font deserializer.

git-svn-id: http://skia.googlecode.com/svn/trunk@3551 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
djsollen@google.com 2012-03-30 12:42:12 +00:00
parent a0b63b8631
commit 4cccc6b224

View File

@ -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();