aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkFontHost_fontconfig.cpp
diff options
context:
space:
mode:
authorGravatar tomhudson <tomhudson@chromium.org>2014-07-01 18:54:41 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-07-01 18:54:41 -0700
commite438ddbc7451ec80f953266409fea4695e78c8c2 (patch)
tree1083a84328900ee89c999ed110bf3d7648f37a2d /src/ports/SkFontHost_fontconfig.cpp
parentdc1cf66483e93c2d12d938bc1ce3b8c60cc68da5 (diff)
Uses optional mutex to guard construction of the singleton, which
initializes the non-threadsafe libfontconfig. Without this change, Skia's parallel path ops test runner crashes 6/10 and hangs 2/10 on startup; with this change, 0/10 problems. BUG=skia:2693 R=mtklein@google.com, bungeman@google.com, reed@google.com Committed: https://skia.googlesource.com/skia/+/df022f5972ae6a2a1d96d15c50eca52cade3abd8 Committed: https://skia.googlesource.com/skia/+/60b08a0adfe73f593af62c8d3f55958438360e1b Author: tomhudson@chromium.org Review URL: https://codereview.chromium.org/355573006
Diffstat (limited to 'src/ports/SkFontHost_fontconfig.cpp')
-rw-r--r--src/ports/SkFontHost_fontconfig.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ports/SkFontHost_fontconfig.cpp b/src/ports/SkFontHost_fontconfig.cpp
index 07bfbd044c..8abf5cf7f0 100644
--- a/src/ports/SkFontHost_fontconfig.cpp
+++ b/src/ports/SkFontHost_fontconfig.cpp
@@ -50,7 +50,7 @@ static SkFontConfigInterface* RefFCI() {
if (fci) {
return fci;
}
- fci = SkFontConfigInterface::GetSingletonDirectInterface();
+ fci = SkFontConfigInterface::GetSingletonDirectInterface(&gFontConfigInterfaceMutex);
SkFontConfigInterface::SetGlobal(fci);
}
}