Index: src/core/SkPictureShader.cpp |
diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp |
index 198a2a9e497602b24e0ed7b5ed4a9f66c9899a19..5cac5aebb96ce546dafbac2d548b536807ce9999 100644 |
--- a/src/core/SkPictureShader.cpp |
+++ b/src/core/SkPictureShader.cpp |
@@ -34,14 +34,17 @@ public: |
, fTile(tile) |
, fTmx(tmx) |
, fTmy(tmy) |
- , fScale(scale) |
- , fLocalMatrix(localMatrix) { |
+ , fScale(scale) { |
+ |
+ for (int i = 0; i < 9; ++i) { |
+ fLocalMatrixStorage[i] = localMatrix[i]; |
+ } |
static const size_t keySize = sizeof(fPictureID) + |
sizeof(fTile) + |
sizeof(fTmx) + sizeof(fTmy) + |
sizeof(fScale) + |
- sizeof(fLocalMatrix); |
+ sizeof(fLocalMatrixStorage); |
// This better be packed. |
SkASSERT(sizeof(uint32_t) * (&fEndOfStruct - &fPictureID) == keySize); |
this->init(&gBitmapSkaderKeyNamespaceLabel, keySize); |
@@ -52,7 +55,7 @@ private: |
SkRect fTile; |
SkShader::TileMode fTmx, fTmy; |
SkSize fScale; |
- SkMatrix fLocalMatrix; |
+ SkScalar fLocalMatrixStorage[9]; |
SkDEBUGCODE(uint32_t fEndOfStruct;) |
}; |