Index: src/effects/SkPerlinNoiseShader.cpp |
diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp |
index 101537798e6842a795d7f6c932491de3df0aab96..68645540caca4c7dfbb0a34208e19f9afe355e29 100644 |
--- a/src/effects/SkPerlinNoiseShader.cpp |
+++ b/src/effects/SkPerlinNoiseShader.cpp |
@@ -439,7 +439,10 @@ SkPerlinNoiseShader::PerlinNoiseShaderContext::PerlinNoiseShaderContext( |
: INHERITED(shader, rec) |
{ |
SkMatrix newMatrix = *rec.fMatrix; |
- newMatrix.postConcat(shader.getLocalMatrix()); |
+ newMatrix.preConcat(shader.getLocalMatrix()); |
+ if (rec.fLocalMatrix) { |
+ newMatrix.preConcat(*rec.fLocalMatrix); |
+ } |
SkMatrix invMatrix; |
if (!newMatrix.invert(&invMatrix)) { |
invMatrix.reset(); |