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

Unified Diff: gm/verylargebitmap.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/vertices.cpp ('k') | gm/xfermodes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/verylargebitmap.cpp
diff --git a/gm/verylargebitmap.cpp b/gm/verylargebitmap.cpp
index 5c67e77e3e99eef57c35ccf386266125e822ef2d..ab6821dc1abc651b01b40e57a9075a3afcb11145 100644
--- a/gm/verylargebitmap.cpp
+++ b/gm/verylargebitmap.cpp
@@ -15,10 +15,9 @@
static void draw(SkCanvas* canvas, int width, int height, SkColor colors[2]) {
const SkPoint center = { SkIntToScalar(width)/2, SkIntToScalar(height)/2 };
const SkScalar radius = 40;
- SkShader* shader = SkGradientShader::CreateRadial(center, radius, colors, nullptr, 2,
- SkShader::kMirror_TileMode);
SkPaint paint;
- paint.setShader(shader)->unref();
+ paint.setShader(SkGradientShader::MakeRadial(center, radius, colors, nullptr, 2,
+ SkShader::kMirror_TileMode));
paint.setXfermodeMode(SkXfermode::kSrc_Mode);
canvas->drawPaint(paint);
}
« no previous file with comments | « gm/vertices.cpp ('k') | gm/xfermodes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698