diff options
author | 2014-07-11 12:19:00 -0700 | |
---|---|---|
committer | 2014-07-11 12:19:02 -0700 | |
commit | 1b0aa001e8f5245663965992f32df6a43cb22e2f (patch) | |
tree | af59a480292aed0c613500905b7e19a904f06f39 /src/core | |
parent | 936b73424f7393994be832376287da988a52b993 (diff) |
No need to cache local matrix in picture shader.
Now that the local matrix cannot be changed, we no longer need
to keep track of it to regenerate the bitmap shader.
Depends on https://codereview.chromium.org/379323002
R=fmalita@google.com, fmalita@chromium.org
Author: scroggo@google.com
Review URL: https://codereview.chromium.org/387043002
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkPictureShader.cpp | 5 | ||||
-rw-r--r-- | src/core/SkPictureShader.h | 1 |
2 files changed, 1 insertions, 5 deletions
diff --git a/src/core/SkPictureShader.cpp b/src/core/SkPictureShader.cpp index d6b84c356a..ab4de039fb 100644 --- a/src/core/SkPictureShader.cpp +++ b/src/core/SkPictureShader.cpp @@ -81,9 +81,7 @@ SkShader* SkPictureShader::refBitmapShader(const SkMatrix& matrix, const SkMatri SkAutoMutexAcquire ama(fCachedBitmapShaderMutex); - // TODO(fmalita): remove fCachedLocalMatrix from this key after getLocalMatrix is removed. - if (!fCachedBitmapShader || tileScale != fCachedTileScale || - this->getLocalMatrix() != fCachedLocalMatrix) { + if (!fCachedBitmapShader || tileScale != fCachedTileScale) { SkBitmap bm; if (!bm.allocN32Pixels(tileSize.width(), tileSize.height())) { return NULL; @@ -95,7 +93,6 @@ SkShader* SkPictureShader::refBitmapShader(const SkMatrix& matrix, const SkMatri canvas.drawPicture(fPicture); fCachedTileScale = tileScale; - fCachedLocalMatrix = this->getLocalMatrix(); SkMatrix shaderMatrix = this->getLocalMatrix(); shaderMatrix.preScale(1 / tileScale.width(), 1 / tileScale.height()); diff --git a/src/core/SkPictureShader.h b/src/core/SkPictureShader.h index 4995d268f3..8df60306fd 100644 --- a/src/core/SkPictureShader.h +++ b/src/core/SkPictureShader.h @@ -48,7 +48,6 @@ private: mutable SkMutex fCachedBitmapShaderMutex; mutable SkAutoTUnref<SkShader> fCachedBitmapShader; mutable SkSize fCachedTileScale; - mutable SkMatrix fCachedLocalMatrix; class PictureShaderContext : public SkShader::Context { public: |