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
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;
canvas.drawPicture(fPicture);
fCachedTileScale = tileScale;
- fCachedLocalMatrix = this->getLocalMatrix();
SkMatrix shaderMatrix = this->getLocalMatrix();
shaderMatrix.preScale(1 / tileScale.width(), 1 / tileScale.height());
mutable SkMutex fCachedBitmapShaderMutex;
mutable SkAutoTUnref<SkShader> fCachedBitmapShader;
mutable SkSize fCachedTileScale;
- mutable SkMatrix fCachedLocalMatrix;
class PictureShaderContext : public SkShader::Context {
public: