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

Unified Diff: samplecode/Sample2PtRadial.cpp

Issue 1772463002: use Make instead of Create to return a shared shader (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
« no previous file with comments | « samplecode/PerlinPatch.cpp ('k') | samplecode/SampleAARectModes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/Sample2PtRadial.cpp
diff --git a/samplecode/Sample2PtRadial.cpp b/samplecode/Sample2PtRadial.cpp
index 07efd0a41c78a3d88500d26ed972a159a973f50f..c32025e9cbd94b47ca6f60515fd4f82b2c241781 100644
--- a/samplecode/Sample2PtRadial.cpp
+++ b/samplecode/Sample2PtRadial.cpp
@@ -33,12 +33,10 @@ protected:
SkScalar r0 = 100;
SkPoint c1 = { 100, 100 };
SkScalar r1 = 100;
- SkShader* s = SkGradientShader::CreateTwoPointConical(c0, r0, c1, r1, colors,
- nullptr, 2,
- SkShader::kClamp_TileMode);
-
SkPaint paint;
- paint.setShader(s)->unref();
+ paint.setShader(SkGradientShader::MakeTwoPointConical(c0, r0, c1, r1, colors,
+ nullptr, 2,
+ SkShader::kClamp_TileMode));
canvas->drawPaint(paint);
}
« no previous file with comments | « samplecode/PerlinPatch.cpp ('k') | samplecode/SampleAARectModes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698