Index: gm/shadertext3.cpp |
diff --git a/gm/shadertext3.cpp b/gm/shadertext3.cpp |
index 07ecd7184b7305b117ed7667a799cf60370fd79a..0d1c03e345a20846d3f77cf1d6b9e382bcf02547 100644 |
--- a/gm/shadertext3.cpp |
+++ b/gm/shadertext3.cpp |
@@ -26,11 +26,11 @@ static void makebm(SkBitmap* bm, int w, int h) { |
SkPaint paint; |
- paint.setShader(SkGradientShader::CreateLinear(kPts0, kColors0, kPos, |
- SK_ARRAY_COUNT(kColors0), SkShader::kClamp_TileMode))->unref(); |
+ paint.setShader(SkGradientShader::MakeLinear(kPts0, kColors0, kPos, |
+ SK_ARRAY_COUNT(kColors0), SkShader::kClamp_TileMode)); |
canvas.drawPaint(paint); |
- paint.setShader(SkGradientShader::CreateLinear(kPts1, kColors1, kPos, |
- SK_ARRAY_COUNT(kColors1), SkShader::kClamp_TileMode))->unref(); |
+ paint.setShader(SkGradientShader::MakeLinear(kPts1, kColors1, kPos, |
+ SK_ARRAY_COUNT(kColors1), SkShader::kClamp_TileMode)); |
canvas.drawPaint(paint); |
} |
@@ -100,17 +100,13 @@ protected: |
localM.postRotate(20); |
localM.postScale(1.15f, .85f); |
- SkAutoTUnref<SkShader> shader(SkShader::CreateBitmapShader(fBmp, |
- kTileModes[tm0], |
- kTileModes[tm1], |
- &localM)); |
- |
SkPaint fillPaint; |
fillPaint.setAntiAlias(true); |
sk_tool_utils::set_portable_typeface(&fillPaint); |
fillPaint.setTextSize(SkIntToScalar(kPointSize)); |
fillPaint.setFilterQuality(kLow_SkFilterQuality); |
- fillPaint.setShader(shader); |
+ fillPaint.setShader(SkShader::MakeBitmapShader(fBmp, kTileModes[tm0], |
+ kTileModes[tm1], &localM)); |
canvas->drawText(kText, kTextLen, 0, 0, fillPaint); |
canvas->drawText(kText, kTextLen, 0, 0, outlinePaint); |