| Index: src/core/SkLocalMatrixShader.cpp
|
| diff --git a/src/core/SkLocalMatrixShader.cpp b/src/core/SkLocalMatrixShader.cpp
|
| index 53580e6ac953f48cc983a59116b6996953f221c1..c77f38d6d68bcf53d6a230bce164d3f8a32a6ce3 100644
|
| --- a/src/core/SkLocalMatrixShader.cpp
|
| +++ b/src/core/SkLocalMatrixShader.cpp
|
| @@ -8,7 +8,9 @@
|
| #include "SkLocalMatrixShader.h"
|
|
|
| SkLocalMatrixShader::SkLocalMatrixShader(SkReadBuffer& buffer) : INHERITED(buffer) {
|
| - buffer.readMatrix(&fProxyLocalMatrix);
|
| + if (buffer.isVersionLT(SkReadBuffer::kSimplifyLocalMatrix_Version)) {
|
| + buffer.readMatrix(&(INHERITED::fLocalMatrix));
|
| + }
|
| fProxyShader.reset(buffer.readShader());
|
| if (NULL == fProxyShader.get()) {
|
| sk_throw();
|
| @@ -17,7 +19,6 @@ SkLocalMatrixShader::SkLocalMatrixShader(SkReadBuffer& buffer) : INHERITED(buffe
|
|
|
| void SkLocalMatrixShader::flatten(SkWriteBuffer& buffer) const {
|
| this->INHERITED::flatten(buffer);
|
| - buffer.writeMatrix(fProxyLocalMatrix);
|
| buffer.writeFlattenable(fProxyShader.get());
|
| }
|
|
|
| @@ -26,10 +27,10 @@ SkShader::Context* SkLocalMatrixShader::onCreateContext(const ContextRec& rec,
|
| ContextRec newRec(rec);
|
| SkMatrix tmp;
|
| if (rec.fLocalMatrix) {
|
| - tmp.setConcat(fProxyLocalMatrix, *rec.fLocalMatrix);
|
| + tmp.setConcat(this->getLocalMatrix(), *rec.fLocalMatrix);
|
| newRec.fLocalMatrix = &tmp;
|
| } else {
|
| - newRec.fLocalMatrix = &fProxyLocalMatrix;
|
| + newRec.fLocalMatrix = &this->getLocalMatrix();
|
| }
|
| return fProxyShader->createContext(newRec, storage);
|
| }
|
|
|