Index: src/core/SkBitmapProcShader.cpp |
diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp |
index 00d938be2729c4559da807437f52b12d1dc82045..d726a46f118e960c583a30bc6fd542d6a87ec3e9 100644 |
--- a/src/core/SkBitmapProcShader.cpp |
+++ b/src/core/SkBitmapProcShader.cpp |
@@ -393,7 +393,8 @@ static SkScalar get_combined_min_stretch(const SkMatrix& viewMatrix, const SkMat |
} |
} |
-GrEffectRef* SkBitmapProcShader::asNewEffect(GrContext* context, const SkPaint& paint) const { |
+GrEffectRef* SkBitmapProcShader::asNewEffect(GrContext* context, const SkPaint& paint, |
+ const SkMatrix* localMatrix) const { |
SkMatrix matrix; |
matrix.setIDiv(fRawBitmap.width(), fRawBitmap.height()); |
@@ -401,6 +402,13 @@ GrEffectRef* SkBitmapProcShader::asNewEffect(GrContext* context, const SkPaint& |
if (!this->getLocalMatrix().invert(&lmInverse)) { |
return NULL; |
} |
+ if (localMatrix) { |
+ SkMatrix inv; |
+ if (!localMatrix->invert(&inv)) { |
+ return NULL; |
+ } |
+ lmInverse.postConcat(inv); |
+ } |
matrix.preConcat(lmInverse); |
SkShader::TileMode tm[] = { |