| Index: src/core/SkPictureShader.cpp
|
| diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp
|
| index 27cbb00f63d0bd0ad0a9feaea43a75e97783c092..81f9242854576442f221cce7814261b10bb41817 100644
|
| --- a/src/core/SkPictureShader.cpp
|
| +++ b/src/core/SkPictureShader.cpp
|
| @@ -18,8 +18,10 @@
|
| #include "GrContext.h"
|
| #endif
|
|
|
| -SkPictureShader::SkPictureShader(SkPicture* picture, TileMode tmx, TileMode tmy)
|
| - : fPicture(SkRef(picture))
|
| +SkPictureShader::SkPictureShader(SkPicture* picture, TileMode tmx, TileMode tmy,
|
| + const SkMatrix* localMatrix)
|
| + : INHERITED(localMatrix)
|
| + , fPicture(SkRef(picture))
|
| , fTmx(tmx)
|
| , fTmy(tmy) { }
|
|
|
| @@ -34,11 +36,12 @@ SkPictureShader::~SkPictureShader() {
|
| fPicture->unref();
|
| }
|
|
|
| -SkPictureShader* SkPictureShader::Create(SkPicture* picture, TileMode tmx, TileMode tmy) {
|
| +SkPictureShader* SkPictureShader::Create(SkPicture* picture, TileMode tmx, TileMode tmy,
|
| + const SkMatrix* localMatrix) {
|
| if (!picture || 0 == picture->width() || 0 == picture->height()) {
|
| return NULL;
|
| }
|
| - return SkNEW_ARGS(SkPictureShader, (picture, tmx, tmy));
|
| + return SkNEW_ARGS(SkPictureShader, (picture, tmx, tmy, localMatrix));
|
| }
|
|
|
| void SkPictureShader::flatten(SkWriteBuffer& buffer) const {
|
| @@ -79,6 +82,7 @@ SkShader* SkPictureShader::refBitmapShader(const SkMatrix& matrix) const {
|
|
|
| SkAutoMutexAcquire ama(fCachedBitmapShaderMutex);
|
|
|
| + // TODO(fmalita): remove fCachedLocalMatrix from this key after getLocalMatrix is removed.
|
| if (!fCachedBitmapShader || tileScale != fCachedTileScale ||
|
| this->getLocalMatrix() != fCachedLocalMatrix) {
|
| SkBitmap bm;
|
|
|