Index: samplecode/SampleTiling.cpp |
diff --git a/samplecode/SampleTiling.cpp b/samplecode/SampleTiling.cpp |
index ed244eb3d2ae6d1b41a1957f0f636e25de9e1203..125155e8d050e3a02713244f42c7a8b9b8445d08 100644 |
--- a/samplecode/SampleTiling.cpp |
+++ b/samplecode/SampleTiling.cpp |
@@ -35,15 +35,14 @@ static void makebm(SkBitmap* bm, SkColorType ct, int w, int h) { |
SkPaint paint; |
paint.setDither(true); |
- paint.setShader(SkGradientShader::CreateLinear(pts, colors, pos, |
- SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode))->unref(); |
+ paint.setShader(SkGradientShader::MakeLinear(pts, colors, pos, |
+ SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode)); |
canvas.drawPaint(paint); |
} |
static void setup(SkPaint* paint, const SkBitmap& bm, bool filter, |
SkShader::TileMode tmx, SkShader::TileMode tmy) { |
- SkShader* shader = SkShader::CreateBitmapShader(bm, tmx, tmy); |
- paint->setShader(shader)->unref(); |
+ paint->setShader(SkShader::MakeBitmapShader(bm, tmx, tmy)); |
paint->setFilterQuality(filter ? kLow_SkFilterQuality : kNone_SkFilterQuality); |
} |