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

Unified Diff: samplecode/SampleEffects.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/SampleDitherBitmap.cpp ('k') | samplecode/SampleFatBits.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleEffects.cpp
diff --git a/samplecode/SampleEffects.cpp b/samplecode/SampleEffects.cpp
index b58d5573ada59fca296d31def47686af52be2031..12ea4e23924dbd92a04a9615f7d6d67f0791b613 100644
--- a/samplecode/SampleEffects.cpp
+++ b/samplecode/SampleEffects.cpp
@@ -40,8 +40,8 @@ static void paint_proc2(SkPaint* paint) {
static void paint_proc3(SkPaint* paint) {
SkColor colors[] = { SK_ColorRED, COLOR, SK_ColorBLUE };
SkPoint pts[] = { { 3, 0 }, { 7, 5 } };
- paint->setShader(SkGradientShader::CreateLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors),
- SkShader::kMirror_TileMode))->unref();
+ paint->setShader(SkGradientShader::MakeLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors),
+ SkShader::kMirror_TileMode));
}
static void paint_proc5(SkPaint* paint) {
« no previous file with comments | « samplecode/SampleDitherBitmap.cpp ('k') | samplecode/SampleFatBits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698