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

Unified Diff: gm/imagefiltersclipped.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/hairmodes.cpp ('k') | gm/imagefilterscropexpand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefiltersclipped.cpp
diff --git a/gm/imagefiltersclipped.cpp b/gm/imagefiltersclipped.cpp
index 033b80638f63a72b8ebd4a7f4856759ad2287f1e..f5c9cefbb2866e1cc9a6ef0c95176ca8c07ebfe4 100644
--- a/gm/imagefiltersclipped.cpp
+++ b/gm/imagefiltersclipped.cpp
@@ -53,9 +53,12 @@
SkColor colors[2];
colors[0] = SK_ColorWHITE;
colors[1] = SK_ColorBLACK;
+ SkAutoTUnref<SkShader> shader(
+ SkGradientShader::CreateRadial(SkPoint::Make(x, y), radius, colors, nullptr, 2,
+ SkShader::kClamp_TileMode)
+ );
SkPaint paint;
- paint.setShader(SkGradientShader::MakeRadial(SkPoint::Make(x, y), radius, colors, nullptr,
- 2, SkShader::kClamp_TileMode));
+ paint.setShader(shader);
canvas->drawCircle(x, y, radius, paint);
fGradientCircle.reset(surface->newImageSnapshot());
}
« no previous file with comments | « gm/hairmodes.cpp ('k') | gm/imagefilterscropexpand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698