Index: src/core/SkLocalMatrixShader.cpp |
diff --git a/src/core/SkLocalMatrixShader.cpp b/src/core/SkLocalMatrixShader.cpp |
index 802e72ef3f633717eaac6eac3add13f613a46b82..7af025c442df5a67508c56f8357b7c469c0075b2 100644 |
--- a/src/core/SkLocalMatrixShader.cpp |
+++ b/src/core/SkLocalMatrixShader.cpp |
@@ -30,8 +30,13 @@ public: |
} |
// TODO: need to augment this API to pass in a localmatrix (which we can augment) |
- virtual GrEffectRef* asNewEffect(GrContext* ctx, const SkPaint& paint) const SK_OVERRIDE { |
- return fProxyShader->asNewEffect(ctx, paint); |
+ virtual GrEffectRef* asNewEffect(GrContext* ctx, const SkPaint& paint, |
+ const SkMatrix* localMatrix) const SK_OVERRIDE { |
+ SkMatrix tmp = fProxyLocalMatrix; |
+ if (localMatrix) { |
+ tmp.preConcat(*localMatrix); |
+ } |
+ return fProxyShader->asNewEffect(ctx, paint, &tmp); |
} |
virtual SkShader* refAsALocalMatrixShader(SkMatrix* localMatrix) const SK_OVERRIDE { |