aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkLocalMatrixShader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkLocalMatrixShader.cpp')
-rw-r--r--src/core/SkLocalMatrixShader.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/SkLocalMatrixShader.cpp b/src/core/SkLocalMatrixShader.cpp
index 9d9e109fcb..22eb0fec93 100644
--- a/src/core/SkLocalMatrixShader.cpp
+++ b/src/core/SkLocalMatrixShader.cpp
@@ -51,6 +51,17 @@ SkShader::Context* SkLocalMatrixShader::onMakeContext(
return fProxyShader->makeContext(newRec, alloc);
}
+SkImage* SkLocalMatrixShader::onIsAImage(SkMatrix* outMatrix, enum TileMode* mode) const {
+ SkMatrix imageMatrix;
+ SkImage* image = fProxyShader->isAImage(&imageMatrix, mode);
+ if (outMatrix) {
+ // Local matrix must be applied first so it is on the right side of the concat.
+ *outMatrix = SkMatrix::Concat(imageMatrix, this->getLocalMatrix());
+ }
+
+ return image;
+}
+
bool SkLocalMatrixShader::onAppendStages(SkRasterPipeline* p,
SkColorSpace* dst,
SkArenaAlloc* scratch,