Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: src/core/SkPictureShader.cpp

Issue 792123002: Don't store an SkMatrix in BitmapShaderKey. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: drop unneeded header Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;)
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698