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

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

Issue 2041113004: sk_sp for gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Reserve correctly. Created 4 years, 6 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
Index: src/effects/gradients/SkTwoPointConicalGradient.cpp
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp
index a7cdc7e1b494425fdef992fda04bfd9b36bc3994..afc77feb5f726ca29fd8b7aa88dc5b4ba08905fb 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -356,7 +356,7 @@ void SkTwoPointConicalGradient::flatten(SkWriteBuffer& buffer) const {
#include "SkGr.h"
-const GrFragmentProcessor* SkTwoPointConicalGradient::asFragmentProcessor(
+sk_sp<GrFragmentProcessor> SkTwoPointConicalGradient::asFragmentProcessor(
GrContext* context,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
@@ -364,9 +364,9 @@ const GrFragmentProcessor* SkTwoPointConicalGradient::asFragmentProcessor(
SkSourceGammaTreatment) const {
SkASSERT(context);
SkASSERT(fPtsToUnit.isIdentity());
- SkAutoTUnref<const GrFragmentProcessor> inner(
- Gr2PtConicalGradientEffect::Create(context, *this, fTileMode, localMatrix));
- return GrFragmentProcessor::MulOutputByInputAlpha(inner);
+ sk_sp<GrFragmentProcessor> inner(
+ Gr2PtConicalGradientEffect::Make(context, *this, fTileMode, localMatrix));
+ return GrFragmentProcessor::MulOutputByInputAlpha(std::move(inner));
}
#endif
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient.h ('k') | src/effects/gradients/SkTwoPointConicalGradient_gpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698