Index: gm/surface.cpp |
diff --git a/gm/surface.cpp b/gm/surface.cpp |
index c3eaf9e8d2075a870ead5645c1e4e0e16c3c7f9f..6874b5bea32e8ab4962a15e4276bb8f1533cfdf1 100644 |
--- a/gm/surface.cpp |
+++ b/gm/surface.cpp |
@@ -13,12 +13,12 @@ |
#define W 200 |
#define H 100 |
-static SkShader* make_shader() { |
+static sk_sp<SkShader> make_shader() { |
int a = 0x99; |
int b = 0xBB; |
SkPoint pts[] = { { 0, 0 }, { W, H } }; |
SkColor colors[] = { SkColorSetRGB(a, a, a), SkColorSetRGB(b, b, b) }; |
- return SkGradientShader::CreateLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode); |
+ return SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkShader::kClamp_TileMode); |
} |
static SkSurface* make_surface(GrContext* ctx, const SkImageInfo& info, SkPixelGeometry geo, |
@@ -46,7 +46,7 @@ static void test_draw(SkCanvas* canvas, const char label[]) { |
paint.setLCDRenderText(true); |
paint.setDither(true); |
- paint.setShader(make_shader())->unref(); |
+ paint.setShader(make_shader()); |
canvas->drawRect(SkRect::MakeWH(W, H), paint); |
paint.setShader(nullptr); |