Remove setLocalMatrix calls from picture shader GM.
This makes all --skr tests pass for me. Enabling it by default in DM.
BUG=skia:2378
Committed: http://code.google.com/p/skia/source/detail?r=14549
R=reed@google.com, mtklein@google.com, fmalita@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/260863007
git-svn-id: http://skia.googlecode.com/svn/trunk@14551 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp
index 27cbb00..81f9242 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 @@
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 @@
SkAutoMutexAcquire ama(fCachedBitmapShaderMutex);
+ // TODO(fmalita): remove fCachedLocalMatrix from this key after getLocalMatrix is removed.
if (!fCachedBitmapShader || tileScale != fCachedTileScale ||
this->getLocalMatrix() != fCachedLocalMatrix) {
SkBitmap bm;