From b67b8e6052bf5567eb3f9726dda99a6b260dfb05 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Mon, 12 May 2014 18:12:24 +0000 Subject: [PATCH] apply localmatrix in pre-order, to match other shaders BUG=skia: Review URL: https://codereview.chromium.org/280293002 git-svn-id: http://skia.googlecode.com/svn/trunk@14699 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/effects/SkPerlinNoiseShader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp index 1015377..6864554 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(); -- 2.7.4