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

Unified Diff: gm/rects.cpp

Issue 1793303002: Reland of "more shader-->sp conversions (patchset #5 id:80001 of https://codereview.chromium… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: make pictureRef a value, so its clearer what's going on 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
« no previous file with comments | « gm/rectangletexture.cpp ('k') | gm/roundrects.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rects.cpp
diff --git a/gm/rects.cpp b/gm/rects.cpp
index 38108fed22a2e2bdae0e8b1faf7f1db38dd0daa4..6f4c75e22f066ae959f04c9078b2e28573b8f885 100644
--- a/gm/rects.cpp
+++ b/gm/rects.cpp
@@ -80,13 +80,9 @@ protected:
SkPoint center = SkPoint::Make(SkIntToScalar(-5), SkIntToScalar(30));
SkColor colors[] = { SK_ColorBLUE, SK_ColorRED, SK_ColorGREEN };
SkScalar pos[] = { 0, SK_ScalarHalf, SK_Scalar1 };
- SkShader* s = SkGradientShader::CreateRadial(center,
- SkIntToScalar(20),
- colors,
- pos,
- SK_ARRAY_COUNT(colors),
- SkShader::kClamp_TileMode);
- p.setShader(s)->unref();
+ p.setShader(SkGradientShader::MakeRadial(center, 20, colors, pos,
+ SK_ARRAY_COUNT(colors),
+ SkShader::kClamp_TileMode));
fPaints.push_back(p);
}
« no previous file with comments | « gm/rectangletexture.cpp ('k') | gm/roundrects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698