Index: gm/pictureimagegenerator.cpp |
diff --git a/gm/pictureimagegenerator.cpp b/gm/pictureimagegenerator.cpp |
index 829006d80876e86759b020b1f90af659a1522edc..2d50f3a6bedde651d0a90c2bcf9930314512cf19 100644 |
--- a/gm/pictureimagegenerator.cpp |
+++ b/gm/pictureimagegenerator.cpp |
@@ -68,10 +68,8 @@ static void draw_vector_logo(SkCanvas* canvas, const SkRect& viewBox) { |
const SkScalar pos1[] = { 0, 0.75f }; |
const SkColor colors1[] = { SK_ColorTRANSPARENT, SK_ColorBLACK }; |
SkASSERT(SK_ARRAY_COUNT(pos1) == SK_ARRAY_COUNT(colors1)); |
- SkAutoTUnref<SkShader> gradient1(SkGradientShader::CreateLinear(pts1, colors1, pos1, |
- SK_ARRAY_COUNT(pos1), |
- SkShader::kClamp_TileMode)); |
- paint.setShader(gradient1.get()); |
+ paint.setShader(SkGradientShader::MakeLinear(pts1, colors1, pos1, SK_ARRAY_COUNT(pos1), |
+ SkShader::kClamp_TileMode)); |
canvas->drawRect(underlineRect, paint); |
const SkPoint pts2[] = { SkPoint::Make(iBox.x() - iBox.width() * kGradientPad, 0), |
@@ -88,10 +86,8 @@ static void draw_vector_logo(SkCanvas* canvas, const SkRect& viewBox) { |
SK_ColorBLACK |
}; |
SkASSERT(SK_ARRAY_COUNT(pos2) == SK_ARRAY_COUNT(colors2)); |
- SkAutoTUnref<SkShader> gradient2(SkGradientShader::CreateLinear(pts2, colors2, pos2, |
- SK_ARRAY_COUNT(pos2), |
- SkShader::kClamp_TileMode)); |
- paint.setShader(gradient2.get()); |
+ paint.setShader(SkGradientShader::MakeLinear(pts2, colors2, pos2, SK_ARRAY_COUNT(pos2), |
+ SkShader::kClamp_TileMode)); |
canvas->drawText(kSkiaStr, textLen, 0, 0, paint); |
} |