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

Unified Diff: src/pdf/SkPDFFont.cpp

Issue 348113002: Use SkMutex::assertHeld in SkPDFFont and SkPDFShader. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: AnotherPatchSet Created 6 years, 6 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 | « no previous file | src/pdf/SkPDFShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFFont.cpp
diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp
index 49d383b204ea1f0c25c089fc6ca17efb58ca9db9..014b328030c4e0baa0eacff09150fe510f583264 100644
--- a/src/pdf/SkPDFFont.cpp
+++ b/src/pdf/SkPDFFont.cpp
@@ -872,15 +872,13 @@ SkPDFFont* SkPDFFont::getFontSubset(const SkPDFGlyphSet*) {
// static
SkTDArray<SkPDFFont::FontRec>& SkPDFFont::CanonicalFonts() {
- // This initialization is only thread safe with gcc.
+ SkPDFFont::CanonicalFontsMutex().assertHeld();
static SkTDArray<FontRec> gCanonicalFonts;
return gCanonicalFonts;
}
// static
SkBaseMutex& SkPDFFont::CanonicalFontsMutex() {
- // This initialization is only thread safe with gcc, or when
- // POD-style mutex initialization is used.
SK_DECLARE_STATIC_MUTEX(gCanonicalFontsMutex);
return gCanonicalFontsMutex;
}
« no previous file with comments | « no previous file | src/pdf/SkPDFShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698