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

Unified Diff: gm/rectangletexture.cpp

Issue 1793303002: Reland of "more shader-->sp conversions (patchset #5 id:80001 of https://codereview.chromium… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: make pictureRef a value, so its clearer what's going on 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 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);
}
« 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