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

Unified Diff: gm/rectangletexture.cpp

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

Powered by Google App Engine
This is Rietveld 408576698