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++) { |