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

Unified Diff: gm/rectangletexture.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/rectangletexture.cpp
diff --git a/gm/rectangletexture.cpp b/gm/rectangletexture.cpp
index 20f2ead593674d3dfa52b2b006530769e5beb849..4bdb4c9f1193ad38646240557ff0e318b76df16b 100644
--- a/gm/rectangletexture.cpp
+++ b/gm/rectangletexture.cpp
@@ -42,14 +42,14 @@ protected:
SkCanvas canvas(bmp);
SkPoint pts[] = { {0, 0}, {0, SkIntToScalar(height)} };
SkColor colors0[] = { 0xFF1060B0 , 0xFF102030 };
- paint.setShader(SkGradientShader::CreateLinear(pts, colors0, nullptr, 2,
- SkShader::kClamp_TileMode))->unref();
+ paint.setShader(SkGradientShader::MakeLinear(pts, colors0, nullptr, 2,
+ SkShader::kClamp_TileMode));
canvas.drawPaint(paint);
SkColor colors1[] = { 0xFFA07010 , 0xFFA02080 };
paint.setAntiAlias(true);
- paint.setShader(SkGradientShader::CreateLinear(pts, colors1, nullptr, 2,
- SkShader::kClamp_TileMode))->unref();
+ paint.setShader(SkGradientShader::MakeLinear(pts, colors1, nullptr, 2,
+ SkShader::kClamp_TileMode));
canvas.drawCircle(SkIntToScalar(width) / 2, SkIntToScalar(height) / 2,
SkIntToScalar(width + height) / 5, paint);
}
« gm/pictureshadertile.cpp ('K') | « gm/pictureshadertile.cpp ('k') | gm/rects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698