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

Unified Diff: gm/verylargebitmap.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/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);
}
« gm/pictureshadertile.cpp ('K') | « gm/vertices.cpp ('k') | gm/xfermodes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698