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

Unified Diff: gm/srcmode.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/skbug_257.cpp ('k') | gm/surface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/srcmode.cpp
diff --git a/gm/srcmode.cpp b/gm/srcmode.cpp
index 86fe89bd1a4be4e843edf2d9a1ea2ad92e6e1af8..28bb04bd4eab70e8ab30a5c623ec448f3a87017c 100644
--- a/gm/srcmode.cpp
+++ b/gm/srcmode.cpp
@@ -27,10 +27,8 @@ static void identity_paintproc(SkPaint* paint) {
static void gradient_paintproc(SkPaint* paint) {
const SkColor colors[] = { SK_ColorGREEN, SK_ColorBLUE };
const SkPoint pts[] = { { 0, 0 }, { W, H } };
- SkShader* s = SkGradientShader::CreateLinear(pts, colors, nullptr,
- SK_ARRAY_COUNT(colors),
- SkShader::kClamp_TileMode);
- paint->setShader(s)->unref();
+ paint->setShader(SkGradientShader::MakeLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors),
+ SkShader::kClamp_TileMode));
}
typedef void (*Proc)(SkCanvas*, const SkPaint&);
« no previous file with comments | « gm/skbug_257.cpp ('k') | gm/surface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698