Index: src/effects/gradients/SkGradientShader.cpp |
diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp |
index dce079e9aebf29d564574414e11d0b36f736ee25..0c147946f33c5ac75d67abd32b828df306de7747 100644 |
--- a/src/effects/gradients/SkGradientShader.cpp |
+++ b/src/effects/gradients/SkGradientShader.cpp |
@@ -67,9 +67,11 @@ bool SkGradientShaderBase::DescriptorScope::unflatten(SkReadBuffer& buffer) { |
//////////////////////////////////////////////////////////////////////////////////////////// |
-SkGradientShaderBase::SkGradientShaderBase(const Descriptor& desc) |
+SkGradientShaderBase::SkGradientShaderBase(const Descriptor& desc, const SkMatrix& ptsToUnit) |
: INHERITED(desc.fLocalMatrix) |
+ , fPtsToUnit(ptsToUnit) |
{ |
+ fPtsToUnit.getType(); // Precache so reads are threadsafe. |
SkASSERT(desc.fCount > 1); |
fGradFlags = SkToU8(desc.fGradFlags); |