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/patch.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/ovals.cpp ('k') | gm/perspshaders.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/patch.cpp
diff --git a/gm/patch.cpp b/gm/patch.cpp
index 5b661f4b7c65e910150cadff8d0c43db30a48b89..d9f6d57d6f940f4e232b188ef78073ab9787057c 100644
--- a/gm/patch.cpp
+++ b/gm/patch.cpp
@@ -10,15 +10,15 @@
#include "SkGradientShader.h"
#include "SkPatchUtils.h"
-static sk_sp<SkShader> make_shader() {
+static SkShader* make_shader() {
const SkColor colors[] = {
SK_ColorRED, SK_ColorCYAN, SK_ColorGREEN, SK_ColorWHITE, SK_ColorMAGENTA, SK_ColorBLUE,
SK_ColorYELLOW,
};
const SkPoint pts[] = { { 100.f / 4.f, 0.f }, { 3.f * 100.f / 4.f, 100.f } };
- return SkGradientShader::MakeLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors),
- SkShader::kMirror_TileMode);
+ return SkGradientShader::CreateLinear(pts, colors, nullptr, SK_ARRAY_COUNT(colors),
+ SkShader::kMirror_TileMode);
}
static void draw_control_points(SkCanvas* canvas, const SkPoint cubics[12]) {
@@ -92,7 +92,7 @@
SkXfermode::kModulate_Mode,
};
- sk_sp<SkShader> shader(make_shader());
+ SkAutoTUnref<SkShader> shader(make_shader());
canvas->save();
for (int y = 0; y < 3; y++) {
« no previous file with comments | « gm/ovals.cpp ('k') | gm/perspshaders.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698