Index: src/core/SkFilterShader.cpp |
diff --git a/src/core/SkFilterShader.cpp b/src/core/SkFilterShader.cpp |
index 5c5e8f317c020997ec4ca8b2ba7524fd275b4239..f1cc68d028954abcb9d3f22f82322e75cd234366 100644 |
--- a/src/core/SkFilterShader.cpp |
+++ b/src/core/SkFilterShader.cpp |
@@ -55,41 +55,30 @@ uint32_t SkFilterShader::FilterShaderContext::getFlags() const { |
return shaderF; |
} |
-SkShader::Context* SkFilterShader::createContext(const SkBitmap& device, |
- const SkPaint& paint, |
- const SkMatrix& matrix, |
- void* storage) const { |
- if (!this->validContext(device, paint, matrix)) { |
+SkShader::Context* SkFilterShader::createContext(const ContextRec& rec, void* storage) const { |
+ if (!this->validContext(rec, NULL)) { |
return NULL; |
} |
char* shaderContextStorage = (char*)storage + sizeof(FilterShaderContext); |
- SkShader::Context* shaderContext = fShader->createContext(device, paint, matrix, |
- shaderContextStorage); |
+ SkShader::Context* shaderContext = fShader->createContext(rec, shaderContextStorage); |
SkASSERT(shaderContext); |
- return SkNEW_PLACEMENT_ARGS(storage, FilterShaderContext, |
- (*this, shaderContext, device, paint, matrix)); |
+ return SkNEW_PLACEMENT_ARGS(storage, FilterShaderContext, (*this, shaderContext, rec)); |
} |
size_t SkFilterShader::contextSize() const { |
return sizeof(FilterShaderContext) + fShader->contextSize(); |
} |
-bool SkFilterShader::validContext(const SkBitmap& device, |
- const SkPaint& paint, |
- const SkMatrix& matrix, |
- SkMatrix* totalInverse) const { |
- return this->INHERITED::validContext(device, paint, matrix, totalInverse) && |
- fShader->validContext(device, paint, matrix); |
+bool SkFilterShader::validContext(const ContextRec& rec, SkMatrix* totalInverse) const { |
+ return this->INHERITED::validContext(rec, totalInverse) && fShader->validContext(rec); |
} |
SkFilterShader::FilterShaderContext::FilterShaderContext(const SkFilterShader& filterShader, |
SkShader::Context* shaderContext, |
- const SkBitmap& device, |
- const SkPaint& paint, |
- const SkMatrix& matrix) |
- : INHERITED(filterShader, device, paint, matrix) |
+ const ContextRec& rec) |
+ : INHERITED(filterShader, rec) |
, fShaderContext(shaderContext) {} |
SkFilterShader::FilterShaderContext::~FilterShaderContext() { |