Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: src/effects/gradients/SkLinearGradient.cpp

Issue 2343703003: Revert of Bundle common arguments to GrGradientEffect creation (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/gradients/SkGradientShaderPriv.h ('k') | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkLinearGradient.cpp
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index a93235d31aace6a5d51502f06b6b057a6acd2a49..98b621ec8eb5b8b517ed4542f86239f0eebed54c 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -351,8 +351,11 @@
public:
class GLSLLinearProcessor;
- static sk_sp<GrFragmentProcessor> Make(const CreateArgs& args) {
- return sk_sp<GrFragmentProcessor>(new GrLinearGradient(args));
+ 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));
}
virtual ~GrLinearGradient() { }
@@ -360,8 +363,11 @@
const char* name() const override { return "Linear Gradient"; }
private:
- GrLinearGradient(const CreateArgs& args)
- : INHERITED(args) {
+ GrLinearGradient(GrContext* ctx,
+ const SkLinearGradient& shader,
+ const SkMatrix& matrix,
+ SkShader::TileMode tm)
+ : INHERITED(ctx, shader, matrix, tm) {
this->initClassID<GrLinearGradient>();
}
@@ -461,8 +467,8 @@
}
matrix.postConcat(fPtsToUnit);
- sk_sp<GrFragmentProcessor> inner(GrLinearGradient::Make(
- GrGradientEffect::CreateArgs(args.fContext, this, &matrix, fTileMode)));
+ sk_sp<GrFragmentProcessor> inner(
+ GrLinearGradient::Make(args.fContext, *this, matrix, fTileMode));
return GrFragmentProcessor::MulOutputByInputAlpha(std::move(inner));
}
« no previous file with comments | « src/effects/gradients/SkGradientShaderPriv.h ('k') | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698