Chromium Code Reviews| Index: src/core/SkLocalMatrixShader.h |
| diff --git a/src/core/SkLocalMatrixShader.h b/src/core/SkLocalMatrixShader.h |
| index 3d590e43e60563d24924a75fc297c1bb01da1b8d..e328343d2322e73196a6c5e5d9fab42058f59241 100644 |
| --- a/src/core/SkLocalMatrixShader.h |
| +++ b/src/core/SkLocalMatrixShader.h |
| @@ -12,6 +12,10 @@ |
| #include "SkReadBuffer.h" |
| #include "SkWriteBuffer.h" |
| +#if SK_SUPPORT_GPU |
| +#include "GrFragmentProcessor.h" |
|
bungeman-skia
2016/06/08 21:55:39
Should be a forward declaration.
|
| +#endif |
| + |
| class SkLocalMatrixShader : public SkShader { |
| public: |
| SkLocalMatrixShader(SkShader* proxy, const SkMatrix& localMatrix) |
| @@ -24,16 +28,10 @@ public: |
| } |
| #if SK_SUPPORT_GPU |
| - const GrFragmentProcessor* asFragmentProcessor( |
| + sk_sp<GrFragmentProcessor> asFragmentProcessor( |
| GrContext* context, const SkMatrix& viewM, |
| const SkMatrix* localMatrix, SkFilterQuality fq, |
| - SkSourceGammaTreatment gammaTreatment) const override { |
| - SkMatrix tmp = this->getLocalMatrix(); |
| - if (localMatrix) { |
| - tmp.preConcat(*localMatrix); |
| - } |
| - return fProxyShader->asFragmentProcessor(context, viewM, &tmp, fq, gammaTreatment); |
| - } |
| + SkSourceGammaTreatment gammaTreatment) const override; |
| #endif |
| SkShader* refAsALocalMatrixShader(SkMatrix* localMatrix) const override { |