Index: src/pdf/SkPDFShader.cpp |
diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp |
index 62adf5811db5a3672f73f5e1a8796b6c2596b779..23bd203f9d064cb6ecb069cfff220e15d42b5768 100644 |
--- a/src/pdf/SkPDFShader.cpp |
+++ b/src/pdf/SkPDFShader.cpp |
@@ -659,22 +659,20 @@ SkPDFObject* SkPDFShader::GetPDFShader(const SkShader& shader, |
// static |
SkTDArray<SkPDFShader::ShaderCanonicalEntry>& SkPDFShader::CanonicalShaders() { |
- // This initialization is only thread safe with gcc. |
+ SkPDFShader::CanonicalShadersMutex().assertHeld(); |
static SkTDArray<ShaderCanonicalEntry> gCanonicalShaders; |
return gCanonicalShaders; |
} |
// static |
SkBaseMutex& SkPDFShader::CanonicalShadersMutex() { |
- // This initialization is only thread safe with gcc or when |
- // POD-style mutex initialization is used. |
SK_DECLARE_STATIC_MUTEX(gCanonicalShadersMutex); |
return gCanonicalShadersMutex; |
} |
// static |
SkPDFObject* SkPDFFunctionShader::RangeObject() { |
- // This initialization is only thread safe with gcc. |
+ SkPDFShader::CanonicalShadersMutex().assertHeld(); |
static SkPDFArray* range = NULL; |
// This method is only used with CanonicalShadersMutex, so it's safe to |
// populate domain. |