Index: src/core/SkLocalMatrixShader.cpp |
diff --git a/src/core/SkLocalMatrixShader.cpp b/src/core/SkLocalMatrixShader.cpp |
index ea4db5352c3f7708baef81d5a767e8c0ca126232..cb85019827d62bb713962d6f32bcb8a5d2f9e4e4 100644 |
--- a/src/core/SkLocalMatrixShader.cpp |
+++ b/src/core/SkLocalMatrixShader.cpp |
@@ -7,6 +7,23 @@ |
#include "SkLocalMatrixShader.h" |
+#if SK_SUPPORT_GPU |
+#include "GrFragmentProcessor.h" |
+#endif |
+ |
+#if SK_SUPPORT_GPU |
+sk_sp<GrFragmentProcessor> SkLocalMatrixShader::asFragmentProcessor( |
+ GrContext* context, const SkMatrix& viewM, |
+ const SkMatrix* localMatrix, SkFilterQuality fq, |
+ SkSourceGammaTreatment gammaTreatment) const { |
+ SkMatrix tmp = this->getLocalMatrix(); |
+ if (localMatrix) { |
+ tmp.preConcat(*localMatrix); |
+ } |
+ return fProxyShader->asFragmentProcessor(context, viewM, &tmp, fq, gammaTreatment); |
+} |
+#endif |
+ |
sk_sp<SkFlattenable> SkLocalMatrixShader::CreateProc(SkReadBuffer& buffer) { |
SkMatrix lm; |
buffer.readMatrix(&lm); |