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

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

Issue 2332213007: Bundle common arguments to GrGradientEffect creation (Closed)
Patch Set: Fix non-GPU compile errors 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/SkSweepGradient.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient_gpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkTwoPointConicalGradient.cpp
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp
index 9c0970182d4951243686c698ce4f115ce7ec4482..9558c1f3a1f6362e1f23d9fa15fea7f898c8f3f3 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -6,7 +6,6 @@
*/
#include "SkTwoPointConicalGradient.h"
-#include "SkTwoPointConicalGradient_gpu.h"
struct TwoPtRadialContext {
const TwoPtRadial& fRec;
@@ -355,13 +354,14 @@ void SkTwoPointConicalGradient::flatten(SkWriteBuffer& buffer) const {
#if SK_SUPPORT_GPU
#include "SkGr.h"
+#include "SkTwoPointConicalGradient_gpu.h"
sk_sp<GrFragmentProcessor> SkTwoPointConicalGradient::asFragmentProcessor(
const AsFPArgs& args) const {
SkASSERT(args.fContext);
SkASSERT(fPtsToUnit.isIdentity());
- sk_sp<GrFragmentProcessor> inner(
- Gr2PtConicalGradientEffect::Make(args.fContext, *this, fTileMode, args.fLocalMatrix));
+ sk_sp<GrFragmentProcessor> inner(Gr2PtConicalGradientEffect::Make(
+ GrGradientEffect::CreateArgs(args.fContext, this, args.fLocalMatrix, fTileMode)));
return GrFragmentProcessor::MulOutputByInputAlpha(std::move(inner));
}
« no previous file with comments | « src/effects/gradients/SkSweepGradient.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient_gpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698