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

Unified Diff: gm/circles.cpp

Issue 1776973003: partial switch over to sp usage of shaders (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: move into lua container 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/bmpfilterqualityrepeat.cpp ('k') | gm/clippedbitmapshaders.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/circles.cpp
diff --git a/gm/circles.cpp b/gm/circles.cpp
index 369548cc5996d878aad3568dc818bd805b2a5fa5..4d3e33daee5aab875b025394984668ba33b923de 100644
--- a/gm/circles.cpp
+++ b/gm/circles.cpp
@@ -67,13 +67,8 @@ protected:
SkPoint center = SkPoint::Make(SkIntToScalar(40), SkIntToScalar(40));
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/bmpfilterqualityrepeat.cpp ('k') | gm/clippedbitmapshaders.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698