summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-02 20:51:13 +0000
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-02 20:51:13 +0000
commitd0001ccdf616e32f81a8f0d0215200816eed3d62 (patch)
tree8df02707ad3a2b209fb5ae0c747144c6fbf2c60d
parent6fa3288f3c0db428fda7b7d6d7eed86e19913900 (diff)
downloadsrc-d0001ccdf616e32f81a8f0d0215200816eed3d62.tar.gz
Revert of Remove setLocalMatrix calls from picture shader GM. (https://codereview.chromium.org/260863007/)
Reason for revert: changed GM unexpectedly. will sort out and try again Original issue's description: > 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, fmalita@google.com, mtklein@chromium.org TBR=fmalita@google.com, mtklein@chromium.org, reed@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2378 Author: mtklein@google.com Review URL: https://codereview.chromium.org/265013003 git-svn-id: http://skia.googlecode.com/svn/trunk/src@14550 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--core/SkPictureShader.cpp10
-rw-r--r--core/SkPictureShader.h4
-rw-r--r--core/SkShader.cpp5
3 files changed, 7 insertions, 12 deletions
diff --git a/core/SkPictureShader.cpp b/core/SkPictureShader.cpp
index 9084e92f..27cbb00f 100644
--- a/core/SkPictureShader.cpp
+++ b/core/SkPictureShader.cpp
@@ -18,10 +18,8 @@
#include "GrContext.h"
#endif
-SkPictureShader::SkPictureShader(SkPicture* picture, TileMode tmx, TileMode tmy,
- const SkMatrix* localMatrix)
- : INHERITED(localMatrix)
- , fPicture(SkRef(picture))
+SkPictureShader::SkPictureShader(SkPicture* picture, TileMode tmx, TileMode tmy)
+ : fPicture(SkRef(picture))
, fTmx(tmx)
, fTmy(tmy) { }
@@ -36,8 +34,7 @@ SkPictureShader::~SkPictureShader() {
fPicture->unref();
}
-SkPictureShader* SkPictureShader::Create(SkPicture* picture, TileMode tmx, TileMode tmy,
- const SkMatrix* localMatrix) {
+SkPictureShader* SkPictureShader::Create(SkPicture* picture, TileMode tmx, TileMode tmy) {
if (!picture || 0 == picture->width() || 0 == picture->height()) {
return NULL;
}
@@ -82,7 +79,6 @@ 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;
diff --git a/core/SkPictureShader.h b/core/SkPictureShader.h
index 2ef6c1c9..510c9888 100644
--- a/core/SkPictureShader.h
+++ b/core/SkPictureShader.h
@@ -21,7 +21,7 @@ class SkPicture;
*/
class SkPictureShader : public SkShader {
public:
- static SkPictureShader* Create(SkPicture*, TileMode, TileMode, const SkMatrix* = NULL);
+ static SkPictureShader* Create(SkPicture*, TileMode, TileMode);
virtual ~SkPictureShader();
virtual bool validContext(const ContextRec&, SkMatrix* totalInverse) const SK_OVERRIDE;
@@ -59,7 +59,7 @@ protected:
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
private:
- SkPictureShader(SkPicture*, TileMode, TileMode, const SkMatrix* = NULL);
+ SkPictureShader(SkPicture*, TileMode, TileMode);
SkShader* validInternal(const ContextRec&, SkMatrix* totalInverse) const;
SkShader* refBitmapShader(const SkMatrix&) const;
diff --git a/core/SkShader.cpp b/core/SkShader.cpp
index 67dd5815..0f6ba4ce 100644
--- a/core/SkShader.cpp
+++ b/core/SkShader.cpp
@@ -193,9 +193,8 @@ SkShader* SkShader::CreateBitmapShader(const SkBitmap& src, TileMode tmx, TileMo
return ::CreateBitmapShader(src, tmx, tmy, localMatrix, NULL);
}
-SkShader* SkShader::CreatePictureShader(SkPicture* src, TileMode tmx, TileMode tmy,
- const SkMatrix* localMatrix) {
- return SkPictureShader::Create(src, tmx, tmy, localMatrix);
+SkShader* SkShader::CreatePictureShader(SkPicture* src, TileMode tmx, TileMode tmy) {
+ return SkPictureShader::Create(src, tmx, tmy);
}
#ifndef SK_IGNORE_TO_STRING