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

Unified Diff: samplecode/SampleXfer.cpp

Issue 1772463002: use Make instead of Create to return a shared shader (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 | « samplecode/SampleVertices.cpp ('k') | samplecode/SampleXfermodesBlur.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleXfer.cpp
diff --git a/samplecode/SampleXfer.cpp b/samplecode/SampleXfer.cpp
index 221ba5815ea36b4815213c837ce029566abad802..58546e19cd28d9f49df68fd981e9ba83d6c99929 100644
--- a/samplecode/SampleXfer.cpp
+++ b/samplecode/SampleXfer.cpp
@@ -127,10 +127,9 @@ class CircDrawable : public ModeDrawable {
public:
CircDrawable(SkScalar size, SkColor c) {
const SkColor colors[] = { 0, c };
- SkAutoTUnref<SkShader> shader(SkGradientShader::CreateRadial(SkPoint::Make(size/2, size/2), size/2,
+ fPaint.setShader(SkGradientShader::MakeRadial(SkPoint::Make(size/2, size/2), size/2,
colors, nullptr, 2,
SkShader::kClamp_TileMode));
- fPaint.setShader(shader);
fBounds = SkRect::MakeWH(size, size);
}
« no previous file with comments | « samplecode/SampleVertices.cpp ('k') | samplecode/SampleXfermodesBlur.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698