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

Unified Diff: gm/ovals.cpp

Issue 1789633002: more shader-->sp conversions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 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: gm/ovals.cpp
diff --git a/gm/ovals.cpp b/gm/ovals.cpp
index e4cc46eb210c714dfc3a96cf6f44957c2725c32a..580426b2442c15a2442b37c90dbe1aa12b8da4a6 100755
--- a/gm/ovals.cpp
+++ b/gm/ovals.cpp
@@ -246,12 +246,8 @@ protected:
SkPoint center = SkPoint::Make(SkIntToScalar(0), SkIntToScalar(0));
SkColor colors[] = { SK_ColorBLUE, SK_ColorRED, SK_ColorGREEN };
SkScalar pos[] = { 0, SK_ScalarHalf, SK_Scalar1 };
- SkAutoTUnref<SkShader> shader(SkGradientShader::CreateRadial(center,
- SkIntToScalar(20),
- colors,
- pos,
- SK_ARRAY_COUNT(colors),
- SkShader::kClamp_TileMode));
+ auto shader = SkGradientShader::MakeRadial(center, 20, colors, pos, SK_ARRAY_COUNT(colors),
+ SkShader::kClamp_TileMode);
for (int i = 0; i < fPaints.count(); ++i) {
canvas->save();
« no previous file with comments | « gm/modecolorfilters.cpp ('k') | gm/patch.cpp » ('j') | gm/pictureshadertile.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698