Index: src/effects/SkPerlinNoiseShader.cpp |
diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp |
index 5adb582506e807830c2fcfff9c7c71654406ade7..a4944fb8ffdd2efd59d4d54de94aba20aa4e8865 100644 |
--- a/src/effects/SkPerlinNoiseShader.cpp |
+++ b/src/effects/SkPerlinNoiseShader.cpp |
@@ -425,13 +425,12 @@ SkPMColor SkPerlinNoiseShader::PerlinNoiseShaderContext::shade( |
return SkPreMultiplyARGB(rgba[3], rgba[0], rgba[1], rgba[2]); |
} |
-SkShader::Context* SkPerlinNoiseShader::createContext(const SkBitmap& device, const SkPaint& paint, |
- const SkMatrix& matrix, void* storage) const { |
- if (!this->validContext(device, paint, matrix)) { |
+SkShader::Context* SkPerlinNoiseShader::createContext(const ContextRec& rec, void* storage) const { |
+ if (!this->validContext(rec)) { |
return NULL; |
} |
- return SkNEW_PLACEMENT_ARGS(storage, PerlinNoiseShaderContext, (*this, device, paint, matrix)); |
+ return SkNEW_PLACEMENT_ARGS(storage, PerlinNoiseShaderContext, (*this, rec)); |
} |
size_t SkPerlinNoiseShader::contextSize() const { |
@@ -439,11 +438,10 @@ size_t SkPerlinNoiseShader::contextSize() const { |
} |
SkPerlinNoiseShader::PerlinNoiseShaderContext::PerlinNoiseShaderContext( |
- const SkPerlinNoiseShader& shader, const SkBitmap& device, |
- const SkPaint& paint, const SkMatrix& matrix) |
- : INHERITED(shader, device, paint, matrix) |
+ const SkPerlinNoiseShader& shader, const ContextRec& rec) |
+ : INHERITED(shader, rec) |
{ |
- SkMatrix newMatrix = matrix; |
+ SkMatrix newMatrix = *rec.fMatrix; |
newMatrix.postConcat(shader.getLocalMatrix()); |
SkMatrix invMatrix; |
if (!newMatrix.invert(&invMatrix)) { |