Index: src/effects/gradients/SkLinearGradient.cpp |
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp |
index 98b621ec8eb5b8b517ed4542f86239f0eebed54c..a93235d31aace6a5d51502f06b6b057a6acd2a49 100644 |
--- a/src/effects/gradients/SkLinearGradient.cpp |
+++ b/src/effects/gradients/SkLinearGradient.cpp |
@@ -351,11 +351,8 @@ class GrLinearGradient : public GrGradientEffect { |
public: |
class GLSLLinearProcessor; |
- static sk_sp<GrFragmentProcessor> Make(GrContext* ctx, |
- const SkLinearGradient& shader, |
- const SkMatrix& matrix, |
- SkShader::TileMode tm) { |
- return sk_sp<GrFragmentProcessor>(new GrLinearGradient(ctx, shader, matrix, tm)); |
+ static sk_sp<GrFragmentProcessor> Make(const CreateArgs& args) { |
+ return sk_sp<GrFragmentProcessor>(new GrLinearGradient(args)); |
} |
virtual ~GrLinearGradient() { } |
@@ -363,11 +360,8 @@ public: |
const char* name() const override { return "Linear Gradient"; } |
private: |
- GrLinearGradient(GrContext* ctx, |
- const SkLinearGradient& shader, |
- const SkMatrix& matrix, |
- SkShader::TileMode tm) |
- : INHERITED(ctx, shader, matrix, tm) { |
+ GrLinearGradient(const CreateArgs& args) |
+ : INHERITED(args) { |
this->initClassID<GrLinearGradient>(); |
} |
@@ -467,8 +461,8 @@ sk_sp<GrFragmentProcessor> SkLinearGradient::asFragmentProcessor(const AsFPArgs& |
} |
matrix.postConcat(fPtsToUnit); |
- sk_sp<GrFragmentProcessor> inner( |
- GrLinearGradient::Make(args.fContext, *this, matrix, fTileMode)); |
+ sk_sp<GrFragmentProcessor> inner(GrLinearGradient::Make( |
+ GrGradientEffect::CreateArgs(args.fContext, this, &matrix, fTileMode))); |
return GrFragmentProcessor::MulOutputByInputAlpha(std::move(inner)); |
} |