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

Unified Diff: src/effects/gradients/SkRadialGradient.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/SkLinearGradient.cpp ('k') | src/effects/gradients/SkSweepGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkRadialGradient.cpp
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp
index 5691188db7d5522fbcff40b24b52030c2707fa1e..1fbd1716abad9917f07aaffa2946159b85c65c54 100644
--- a/src/effects/gradients/SkRadialGradient.cpp
+++ b/src/effects/gradients/SkRadialGradient.cpp
@@ -246,8 +246,11 @@
public:
class GLSLRadialProcessor;
- static sk_sp<GrFragmentProcessor> Make(const CreateArgs& args) {
- return sk_sp<GrFragmentProcessor>(new GrRadialGradient(args));
+ static sk_sp<GrFragmentProcessor> Make(GrContext* ctx,
+ const SkRadialGradient& shader,
+ const SkMatrix& matrix,
+ SkShader::TileMode tm) {
+ return sk_sp<GrFragmentProcessor>(new GrRadialGradient(ctx, shader, matrix, tm));
}
virtual ~GrRadialGradient() { }
@@ -255,8 +258,11 @@
const char* name() const override { return "Radial Gradient"; }
private:
- GrRadialGradient(const CreateArgs& args)
- : INHERITED(args) {
+ GrRadialGradient(GrContext* ctx,
+ const SkRadialGradient& shader,
+ const SkMatrix& matrix,
+ SkShader::TileMode tm)
+ : INHERITED(ctx, shader, matrix, tm) {
this->initClassID<GrRadialGradient>();
}
@@ -355,8 +361,8 @@
matrix.postConcat(inv);
}
matrix.postConcat(fPtsToUnit);
- sk_sp<GrFragmentProcessor> inner(GrRadialGradient::Make(
- GrGradientEffect::CreateArgs(args.fContext, this, &matrix, fTileMode)));
+ sk_sp<GrFragmentProcessor> inner(
+ GrRadialGradient::Make(args.fContext, *this, matrix, fTileMode));
return GrFragmentProcessor::MulOutputByInputAlpha(std::move(inner));
}
« no previous file with comments | « src/effects/gradients/SkLinearGradient.cpp ('k') | src/effects/gradients/SkSweepGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698