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

Unified Diff: gm/verylargebitmap.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/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 ab6821dc1abc651b01b40e57a9075a3afcb11145..5c67e77e3e99eef57c35ccf386266125e822ef2d 100644
--- a/gm/verylargebitmap.cpp
+++ b/gm/verylargebitmap.cpp
@@ -15,9 +15,10 @@
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(SkGradientShader::MakeRadial(center, radius, colors, nullptr, 2,
- SkShader::kMirror_TileMode));
+ paint.setShader(shader)->unref();
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